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('/');