-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
feat: Adds setting to ignore automatic messages on metrics #34274
base: develop
Are you sure you want to change the base?
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 |
🦋 Changeset detectedLatest commit: 4221773 The changes in this PR will be included in the next version bump. This PR includes changesets to release 37 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #34274 +/- ##
=========================================
Coverage 59.17% 59.18%
=========================================
Files 2822 2821 -1
Lines 68118 67699 -419
Branches 15145 15075 -70
=========================================
- Hits 40312 40066 -246
+ Misses 24975 24814 -161
+ Partials 2831 2819 -12
Flags with carried forward coverage won't be shown. Click here to find out more. |
No longer with us
import type { IMessage, IUser } from '@rocket.chat/core-typings'; | ||
import { Users } from '@rocket.chat/models'; | ||
|
||
export async function isMessageFromBot(message: IMessage): Promise<boolean> { |
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.
Why not use Users.isUserInRole
?
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.
I wasn't aware of this method, definitely worth to use it.
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.
Why not use the model method directly instead of creating this new template method (function)?
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.
Mainly, for readability.
Co-authored-by: Marcos Spessatto Defendi <marcos.defendi@rocket.chat>
import type { IMessage, IUser } from '@rocket.chat/core-typings'; | ||
import { Users } from '@rocket.chat/models'; | ||
|
||
export async function isMessageFromBot(message: IMessage): Promise<boolean> { |
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.
Why not use the model method directly instead of creating this new template method (function)?
Proposed changes (including videos or screenshots)
This PR adds a new setting to consider or not automatic messages (bot messages) on response time metrics.
Issue(s)
CORE-668
Steps to test or reproduce
Further comments