From 98355edf9239ede00a475ad23adf788df8188a98 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Tue, 18 Jan 2022 13:52:16 -0800 Subject: [PATCH] Fix username regex --- src/room/GroupCallInspector.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/room/GroupCallInspector.jsx b/src/room/GroupCallInspector.jsx index 32a7fe3..a46db0b 100644 --- a/src/room/GroupCallInspector.jsx +++ b/src/room/GroupCallInspector.jsx @@ -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) {