mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Fix username regex
This commit is contained in:
parent
c71f37a8f8
commit
98355edf92
@ -49,9 +49,11 @@ function shouldCollapse({ name, src, type, namespace }) {
|
||||
}
|
||||
|
||||
function getUserName(userId) {
|
||||
const match = userId.match("@(.+):");
|
||||
const match = userId.match(/@([^\:]+):/);
|
||||
|
||||
return match && match.length > 0 ? match[1].replace("-", " ") : userId;
|
||||
return match && match.length > 0
|
||||
? match[1].replace("-", " ").replace("W", "")
|
||||
: userId.replace("W", "");
|
||||
}
|
||||
|
||||
function formatContent(type, content) {
|
||||
|
Loading…
Reference in New Issue
Block a user