on frontend attempt to handle events without matching queue

This commit is contained in:
Anton Georgiev 2021-02-17 20:51:36 +00:00
parent b2c4244276
commit 683847304d

View File

@ -239,14 +239,23 @@ class RedisPubSub {
}
}
// process the event - whether it's a system message or not, the meetingIdFromMessageCoreHeader value is adjusted
this.meetingsQueues[meetingIdFromMessageCoreHeader].add({
pattern,
channel,
eventName,
parsedMessage,
});
if (!this.meetingsQueues[meetingIdFromMessageCoreHeader]) {
Logger.warn(`Frontend meeting queue had not been initialized ${message}`, { eventName, meetingIdFromMessageCoreHeader} )
this.meetingsQueues[NO_MEETING_ID].add({
pattern,
channel,
eventName,
parsedMessage,
});
} else {
// process the event - whether it's a system message or not, the meetingIdFromMessageCoreHeader value is adjusted
this.meetingsQueues[meetingIdFromMessageCoreHeader].add({
pattern,
channel,
eventName,
parsedMessage,
});
}
} else {
if (meetingIdFromMessageCoreHeader === NO_MEETING_ID) { // if this is a system message
const meetingIdFromMessageMeetingProp = parsedMessage.core.body.props?.meetingProp?.intId;