Skip to content

Conversation

@murtaza98
Copy link
Contributor

@murtaza98 murtaza98 commented Jun 18, 2021

Proposed changes (including videos or screenshots)

As you can see here the predictedVisitorAbandonment flag is not set if the room object doesn't have v.lastMessageTs property. So we need to always make sure the v.lastMessageTs is set before this method is called.

Currently the v.lastMessageTs is being set in this (lets call this hook-1) hook which has HIGH priority
and the predictedVisitorAbandonment check is inturn performed in this (let call this hook-2) hook which is also HIGH priority.

So ideally we'd except the hook-1 to be called b4 hook-2, however currently since both of them are at same priority, there is no way to control which one is executed first. Hence in this PR, I'm making the priority of hook-2 as MEDIUM to keeping the priority of hook-1 the same as b4, i.e. HIGH. This should make sure that the hook-1 is always executed b4 hook-2

Issue(s)

Steps to test or reproduce

Further comments

@murtaza98 murtaza98 changed the title [Fix] Visitor Inactivity monitor not working [FIX] Visitor Inactivity monitor not working Jun 18, 2021
@murtaza98 murtaza98 requested a review from renatobecker June 18, 2021 19:04
@murtaza98 murtaza98 changed the title [FIX] Visitor Inactivity monitor not working [FIX][ENTERPRISE] Race condition on Omnichannel visitor abandoned callback Jun 28, 2021
@renatobecker renatobecker merged commit 6d8ae0b into develop Jun 29, 2021
@renatobecker renatobecker deleted the omnichannel/fix-visitor-monitor-not-working branch June 29, 2021 10:56
gabriellsh added a commit that referenced this pull request Jul 1, 2021
…at into rewrite/create_disc

* 'rewrite/create_disc' of github.com:RocketChat/Rocket.Chat: (35 commits)
  [NEW] `roles.delete` endpoint (#22497)
  [FIX][ENTERPRISE] Race condition on Omnichannel visitor abandoned callback (#22413)
  i18n: Language update from LingoHub 🤖 on 2021-06-28Z (#22491)
  Chore: Support other PR titles (#22494)
  Chore: Remove JSON parse middleware (#22454)
  [FIX] Deleting own account asks for the username in the UI instead of the password (#22405)
  [IMPROVE] Replace OTR Icon on Contextual Bar & Update Icons (#22377)
  Bump version to 3.17.0-develop
  [IMPROVE] Wrong error message when trying to create a blocked username (#22452)
  Update README.md (#22462)
  Bump version to 3.16.0
  Bump version to 3.16.0-rc.5
  Bump: Fuselage 0.27.0 (#22486)
  Bump version to 3.16.0-rc.4
  Bump version to 3.15.2
  [FIX][ENTERPRISE] Omnichannel enterprise permissions being added back to its default roles (#22322)
  [FIX] Sound notification is not emitted when the Omnichannel chat comes from another department (#22291)
  [FIX] Visitor info screen being updated multiple times (#22482)
  [FIX] Visitor info screen being updated multiple times (#22482)
  Bump version to 3.16.0-rc.3
  ...
@ggazzo ggazzo mentioned this pull request Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants