-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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: Add the possibility for removing the watcher for the message collection #30381
Conversation
|
export const listenToMessageSentEvent = (service: IServiceClass, action: (message: IMessage) => Promise<void>): void => { | ||
if (dbWatchersDisabled) { | ||
return service.onEvent('message.sent', (message: IMessage) => action(message)); | ||
} | ||
return service.onEvent('watch.messages', ({ message }) => action(message)); | ||
}; |
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.
@ggazzo @sampaiodiego I decided to create another event to handle the "manual" process of sending events instead of using the existing watch.messages
.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #30381 +/- ##
===========================================
+ Coverage 46.31% 51.16% +4.84%
===========================================
Files 766 807 +41
Lines 14677 15140 +463
Branches 2753 2820 +67
===========================================
+ Hits 6798 7746 +948
+ Misses 7480 6960 -520
- Partials 399 434 +35
Flags with carried forward coverage won't be shown. Click here to find out more. |
Proposed changes (including videos or screenshots)
https://rocketchat.atlassian.net/browse/ARCH-1208
Issue(s)
Steps to test or reproduce
Further comments