-
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
refactor: return created record from registerGuest #32620
Conversation
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #32620 +/- ##
===========================================
- Coverage 56.75% 56.65% -0.11%
===========================================
Files 2498 2494 -4
Lines 55390 55387 -3
Branches 11457 11457
===========================================
- Hits 31439 31378 -61
- Misses 21243 21308 +65
+ Partials 2708 2701 -7
Flags with carried forward coverage won't be shown. Click here to find out more. |
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
…avoid breaking changes
9dbd8e8
to
c869396
Compare
c869396
to
328b47b
Compare
Related to OPI-5, PR #72 from Apps.WhatsApp, and PR #771 from Rocket.Chat.Apps-engine.
On the Apps.WhatsApp project, the process of handling new messages and incoming message endpoints has been streamlined. Specifically, there is no need to call
getLivechatVisitors
aftercreateVisitor
when a new message arrives. Inendpoints/WhatsAppMessage.post
, thedefineVisitor
function withinregisterVisitor
has been modified to usemodify.getCreator().getLivechatCreator().createVisitor()
only. The call toread.getLivechatReader().getLivechatVisitors()
has been removed sincecreateVisitor
now returns the inserted or updated record.Also, changes were made here at Rocket.Chat project. The
createVisitor
method in the Livechat bridge has been updated. WithinLivechatTyped.registerGuest
, a new method on modelLivechatVisitors
, calledupdateOneByIdOrToken
was added to handle both insert and update operations. This eliminates the need to run an insert followed by an update, optimizing the overall process.Performance comparison
K6 test results before changes
Incoming messages from WhatsApp flow with new visitor on every request.
Incoming messages from WhatsApp flow with same visitor on every request.
K6 test results after changes
Incoming messages from WhatsApp flow with new visitor on every request.
Incoming messages from WhatsApp flow with same visitor on every request.