|
@@ -326,14 +326,14 @@ JitsiConference.resourceCreator = function(jid, isAuthenticatedUser) {
|
326
|
326
|
// We try to use the first part of the node (which for anonymous users
|
327
|
327
|
// on prosody is a UUID) to match the previous behavior (and maybe make
|
328
|
328
|
// debugging easier).
|
329
|
|
- mucNickname = Strophe.getNodeFromJid(jid).substr(0, 8)
|
|
329
|
+ mucNickname = Strophe.getNodeFromJid(jid)?.substr(0, 8)
|
330
|
330
|
.toLowerCase();
|
331
|
331
|
|
332
|
332
|
// But if this doesn't have the required format we just generate a new
|
333
|
333
|
// random nickname.
|
334
|
334
|
const re = /[0-9a-f]{8}/g;
|
335
|
335
|
|
336
|
|
- if (!re.test(mucNickname)) {
|
|
336
|
+ if (!mucNickname || !re.test(mucNickname)) {
|
337
|
337
|
mucNickname = RandomUtil.randomHexString(8).toLowerCase();
|
338
|
338
|
}
|
339
|
339
|
}
|