From 85e5a4b07563e900e705ba5da393df751472ead0 Mon Sep 17 00:00:00 2001 From: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Date: Fri, 17 Dec 2021 17:57:17 -0300 Subject: [PATCH] [FIX] OTR not working (#23973) --- server/modules/notifications/notifications.module.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/modules/notifications/notifications.module.ts b/server/modules/notifications/notifications.module.ts index ba11ab8db5a..7d56fdf694b 100644 --- a/server/modules/notifications/notifications.module.ts +++ b/server/modules/notifications/notifications.module.ts @@ -275,13 +275,12 @@ export class NotificationsModule { }); this.streamUser.allowWrite(async function(eventName) { - const [userId, e] = eventName.split('/'); - + const [, e] = eventName.split('/'); if (e === 'webrtc') { return true; } - return (this.userId != null) && (this.userId === userId); + return Boolean(this.userId); }); this.streamUser.allowRead(async function(eventName) { const [userId, e] = eventName.split('/');