chore: Trim formatted username fallback

A user has a mxid with a trailing "-" which
becomes a whitespace here. We should
trim those whitespaces after formatting.
This commit is contained in:
Krille Fear 2021-11-15 13:08:31 +01:00
parent 0be1576465
commit 13658b7da8
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ class User extends Event {
words[i] = words[i][0].toUpperCase() + words[i].substring(1);
}
}
return words.join(' ');
return words.join(' ').trim();
}
return 'Unknown user';
}