Skip to content

Commit

Permalink
fix(conversation): prevent notification to modify object with outdate…
Browse files Browse the repository at this point in the history
…d information

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Jan 10, 2024
1 parent 11b5cf4 commit b6d593d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/store/conversationsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,11 @@ const actions = {

const activeSince = (new Date(notification.datetime)).getTime() / 1000

// Check if notification information is older than in known conversation object
if (activeSince < getters.conversations[token].lastActivity) {
return
}

const conversation = Object.assign({}, getters.conversations[token], {
hasCall: true,
callFlag: PARTICIPANT.CALL_FLAG.WITH_VIDEO,
Expand Down

0 comments on commit b6d593d

Please sign in to comment.