feat: Skips notifications for messages from history (the messages on join).
This commit is contained in:
parent
1c4283eeca
commit
8d62e010e0
|
@ -320,7 +320,10 @@ function _handleReceivedMessage({ dispatch, getState },
|
||||||
const hasRead = participant.local || isChatOpen;
|
const hasRead = participant.local || isChatOpen;
|
||||||
const timestampToDate = timestamp ? new Date(timestamp) : new Date();
|
const timestampToDate = timestamp ? new Date(timestamp) : new Date();
|
||||||
const millisecondsTimestamp = timestampToDate.getTime();
|
const millisecondsTimestamp = timestampToDate.getTime();
|
||||||
const shouldShowNotification = userSelectedNotifications['notify.chatMessages'] && !hasRead && !isReaction;
|
|
||||||
|
// skip message notifications on join (the messages having timestamp - coming from the history)
|
||||||
|
const shouldShowNotification = userSelectedNotifications['notify.chatMessages']
|
||||||
|
&& !hasRead && !isReaction && !timestamp;
|
||||||
|
|
||||||
dispatch(addMessage({
|
dispatch(addMessage({
|
||||||
displayName,
|
displayName,
|
||||||
|
|
Loading…
Reference in New Issue