Lightning bolt optional
This commit is contained in:
parent
f430b87459
commit
df8703cc13
5 changed files with 27 additions and 3 deletions
|
@ -626,7 +626,13 @@ impl Service {
|
|||
services().users.create(&user_id, Some(password.as_str()))?;
|
||||
|
||||
// Default to pretty displayname
|
||||
let displayname = format!("{} ⚡️", user_id.localpart());
|
||||
let mut displayname = user_id.localpart().to_owned();
|
||||
|
||||
// If enabled append lightning bolt to display name (default true)
|
||||
if services().globals.enable_lightning_bolt() {
|
||||
displayname.push_str(" ⚡️");
|
||||
}
|
||||
|
||||
services()
|
||||
.users
|
||||
.set_displayname(&user_id, Some(displayname))?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue