-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Improve system messages for omni-visitor abandonment feature #29724
Conversation
🦋 Changeset detectedLatest commit: 184a31c The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report
@@ Coverage Diff @@
## develop #29724 +/- ##
===========================================
+ Coverage 45.35% 46.81% +1.45%
===========================================
Files 671 690 +19
Lines 12833 12981 +148
Branches 2236 2267 +31
===========================================
+ Hits 5821 6077 +256
+ Misses 6687 6572 -115
- Partials 325 332 +7
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about compatibility with old rooms that have v.lastMessage
? Since we're changing the property where we take info, we do need to make sure we keep compatibility with them.
Or we can create a single shot function that moves v.lastMessage
to contactLastMessage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you were able to pin point the problem root (
v = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great explanation @murtaza98, but I would like to enforce: on patches keep your changes small as possible, if you are fixing something focus on the fix, if you are refactoring something try to refactor without change any behavior, if you are creating something new, avoid fixes and code changes that dont are directly related with the new feature
about your change in specific I think its only about change the bridge as you mentioned. that would be a great fix (2..3 lines of code)
if you are planning to replace some field or optimize any message let this to another pull request
apps/meteor/ee/app/livechat-enterprise/server/lib/VisitorInactivityMonitor.ts
Outdated
Show resolved
Hide resolved
…ivityMonitor.ts Co-authored-by: Kevin Aleman <[email protected]>
Proposed changes (including videos or screenshots)
Visitor abandonment feature used to rely onroom.v.lastMessageTs
property to calculate the predicted time when the chat should be considered abandoned. Now when apps were updating the room properties like customFields, then the app converters were overriding lastMessageTs property ( reference ), thus making this abandonment feature not work for rooms created from apps.So to solve this, I've moved the
lastMessageTs
prop out ofroom.v
, and instead I'm storing it asroom.contactLastMessageTs
. This will prevent the app's engine to override this prop, thus fixing the main issue due to which app's room were not being abandoned automatically.Update: This PR has been updated to now only include changes to system messages related to visitor abandonment feature. The rest of the changes wrt visitor abandonment feature not working has been moved to a separate PR here -> #29756
Issue(s)
Steps to test or reproduce
Further comments