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:
parent
0be1576465
commit
13658b7da8
|
|
@ -129,7 +129,7 @@ class User extends Event {
|
||||||
words[i] = words[i][0].toUpperCase() + words[i].substring(1);
|
words[i] = words[i][0].toUpperCase() + words[i].substring(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return words.join(' ');
|
return words.join(' ').trim();
|
||||||
}
|
}
|
||||||
return 'Unknown user';
|
return 'Unknown user';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue