1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-04 17:58:51 +01:00

Merge branch 'zap-displayname' into 'master'

Set nicer displayname

See merge request famedly/conduit!149
This commit is contained in:
Timo Kösters 2021-08-10 05:43:44 +00:00
commit e83c226b1b

View file

@ -193,6 +193,11 @@ pub async fn register_route(
// Create user
db.users.create(&user_id, password)?;
let displayname = format!("{} ⚡️", user_id.localpart());
db.users
.set_displayname(&user_id, Some(displayname.clone()))?;
// Initial data
db.account_data.update(
None,
@ -466,7 +471,7 @@ pub async fn register_route(
event_type: EventType::RoomMember,
content: serde_json::to_value(member::MemberEventContent {
membership: member::MembershipState::Join,
displayname: None,
displayname: Some(displayname),
avatar_url: None,
is_direct: None,
third_party_invite: None,