Skip to content

Commit

Permalink
fix: ignored check
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Mar 27, 2024
1 parent b271e28 commit 43d820b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/hms-video-store/src/reactive-store/HMSSDKActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ export class HMSSDKActions<T extends HMSGenericTypes = { sessionStore: Record<st
HMSLogger.w('sendMessage', 'Failed to send message', messageInput);
throw Error(`sendMessage Failed - ${JSON.stringify(messageInput)}`);
}
if (!!messageInput.type && this.ignoredMessageTypes.includes(messageInput.type)) {
const ignoreMessage = !!messageInput.type && this.ignoredMessageTypes.includes(messageInput.type);
if (ignoreMessage) {
return;
}
const localPeer = this.sdk.getLocalPeer();
Expand All @@ -430,7 +431,7 @@ export class HMSSDKActions<T extends HMSGenericTypes = { sessionStore: Record<st
senderName: localPeer?.name,
sender: localPeer?.peerId,
senderRole: localPeer?.role?.name,
ignored: !!messageInput.type && this.ignoredMessageTypes.includes(messageInput.type),
ignored: false,
};
// update directly to store without batch
this.setState(store => {
Expand Down

0 comments on commit 43d820b

Please sign in to comment.