-
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
Addition to the Stats #5625
Addition to the Stats #5625
Conversation
server/startup/migrations/v082.js
Outdated
version: 82, | ||
up: function() { | ||
RocketChat.models.Rooms.find().forEach((room) => { | ||
RocketChat.models.Rooms.incMsgCountById(room._id, RocketChat.models.Messages.find({ rid: room._id, t: { $exists: true }}).count()); |
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.
Use update and not increment for correctly setting the number of messages.
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.
Actually after reviewing this, our review together is incorrect as this increments the amount of messages by how many system messages there are.
@marceloschmidt is this PR ok now? |
This stats is available in the api? how I can collect data externally? |
@RocketChat/core
Done:
Closes #4619