Skip to content

Commit 1764005

Browse files
committed
fix crash on invalid message
1 parent feed34d commit 1764005

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

connect/connectNotificationServer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ const handler = (topic, message, logger, callback) => {
321321
)).then((notifications) => {
322322
allNotifications = _.filter(notifications, notification => notification.userId !== `${message.initiatorUserId}`);
323323

324-
if (eventConfig.includeUsers){
324+
if (eventConfig.includeUsers && message[eventConfig.includeUsers] && message[eventConfig.includeUsers].length>0){
325325
allNotifications = _.filter(allNotifications, notification => message[eventConfig.includeUsers].contains(notification.userId));
326326
}
327327

0 commit comments

Comments
 (0)