feat: custom text for user displayname suffix upon registration
replaces the lightning bolt emoji option with support for your own text or emojis Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -647,9 +647,11 @@ impl Service {
|
||||
// Default to pretty displayname
|
||||
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(" ⚡️");
|
||||
// If `new_user_displayname_suffix` is set, registration will push whatever content is set to the user's display name with a space before it
|
||||
if !services().globals.new_user_displayname_suffix().is_empty() {
|
||||
displayname.push_str(
|
||||
&(" ".to_owned() + services().globals.new_user_displayname_suffix()),
|
||||
);
|
||||
}
|
||||
|
||||
services()
|
||||
|
||||
Reference in New Issue
Block a user