mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-05 04:08:51 +01:00
Set nicer displayname
This commit is contained in:
parent
1cbc61c558
commit
8335f44bfe
1 changed files with 6 additions and 1 deletions
|
@ -192,6 +192,11 @@ pub async fn register_route(
|
||||||
// Create user
|
// Create user
|
||||||
db.users.create(&user_id, password)?;
|
db.users.create(&user_id, password)?;
|
||||||
|
|
||||||
|
let displayname = format!("{} ⚡️", user_id.localpart());
|
||||||
|
|
||||||
|
db.users
|
||||||
|
.set_displayname(&user_id, Some(displayname.clone()))?;
|
||||||
|
|
||||||
// Initial data
|
// Initial data
|
||||||
db.account_data.update(
|
db.account_data.update(
|
||||||
None,
|
None,
|
||||||
|
@ -465,7 +470,7 @@ pub async fn register_route(
|
||||||
event_type: EventType::RoomMember,
|
event_type: EventType::RoomMember,
|
||||||
content: serde_json::to_value(member::MemberEventContent {
|
content: serde_json::to_value(member::MemberEventContent {
|
||||||
membership: member::MembershipState::Join,
|
membership: member::MembershipState::Join,
|
||||||
displayname: None,
|
displayname: Some(displayname),
|
||||||
avatar_url: None,
|
avatar_url: None,
|
||||||
is_direct: None,
|
is_direct: None,
|
||||||
third_party_invite: None,
|
third_party_invite: None,
|
||||||
|
|
Loading…
Reference in a new issue