Skip to content
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

[FIX] Wrong message count statistics in Admin info page #16680

Merged
merged 7 commits into from
Mar 26, 2020

Conversation

subham103
Copy link
Contributor

@subham103 subham103 commented Feb 21, 2020

Closes #10233
Closes #12610

Previously, the message count for every Room is increased upon message addition but is not updated upon the deletion of a message #12610. So, upon the removal of messages, the message count of rooms shows the wrong message count.

Now the message count of each room is updated upon message deletion, which makes the message count of each room error-free.
So it will be better if we sum up the four values(4 different types of rooms: PrivateGroupMessages, ChannelMessages, DirectMessages, LivechatMessages) to get the exact total message count.

subham103 and others added 4 commits February 21, 2020 18:40
…6680-subham103-fixMessageCountStatistics

* 'develop' of github.com:RocketChat/Rocket.Chat: (29 commits)
  [FIX] ie11 support (RocketChat#16682)
  Regression: Show upload errors (RocketChat#16681)
  [FIX] Delete messages while searching bug (RocketChat#16568)
  Use insertSync
  [FIX] Image uploads (thumbnails) out of threads are not visible in regular message view (RocketChat#16416)
  [FIX] Added an option to pin/unpin a thread message by admin (RocketChat#16457)
  [CHORE] Look for Storybook stories on `app/` too (RocketChat#16595)
  [IMPROVE] Removed the 'reply in thread' from thread replies (RocketChat#16630)
  [FIX] Changed Opt_In message (RocketChat#16631)
  [FIX] LDAP sync admin action was not syncing exisent users (RocketChat#16671)
  [IMPROVE] Check agent status when starting a new conversation with an agent assigned (RocketChat#16618)
  [FIX] Additional scroll when contextual bar is open (RocketChat#16667)
  [FIX] Clear unread red line when the ESC key is pressed (RocketChat#16668)
  [FIX] users.info endpoint not handling the error if the user does not exist (RocketChat#16495)
  Update app/utils/client/lib/RestApiClient.js
  Update app/utils/client/lib/RestApiClient.js
  send files over rest api
  [BUG][FIX] If InternalHubot_Username is undefined then rocket.cat should be default bot
  Improved isSingular function
  Add message_pruned and file_pruned for singular file or message deleted
  ...
gabriellsh
gabriellsh previously approved these changes Feb 21, 2020
Copy link
Member

@gabriellsh gabriellsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just made some small changes to the method name.

@ashwaniYDV
Copy link
Contributor

@subham103 You can rename the function as decMsgCountById to keep it consistent with incMsgCountById as @gabriellsh suggested :)

@subham103
Copy link
Contributor Author

@ashwaniYDV, actually he already renamed it in one of his commits :p

@gabriellsh gabriellsh changed the title Fix message count statistics in Admin info page [FIX] Wrong message count statistics in Admin info page Mar 3, 2020
@subham103
Copy link
Contributor Author

@gabriellsh @ggazzo could you please merge this pr?

@sampaiodiego sampaiodiego merged commit 5355b82 into RocketChat:develop Mar 26, 2020
gabriellsh added a commit that referenced this pull request Mar 26, 2020
…/react-root

* 'develop' of github.com:RocketChat/Rocket.Chat: (76 commits)
  Regression: Fix issue with opening rooms (#17028)
  Group DM improvements
  [NEW] Sort channel directory listing by latest message (#16604)
  [FIX] Wrong message count statistics in Admin info page (#16680)
  Fix: 2FA DDP method not getting code on API call that doesn’t requires 2FA (#16998)
  [NEW] Direct message between multiple users (#16761)
  Bump version to 3.0.7
  Regression: Remove deprecated Omnichannel setting used to fetch the queue data through subscription  (#17017)
  Regression: Remove deprecated Omnichannel setting used to fetch the queue data through subscription  (#17017)
  Bump version to 3.0.6
  [Regression] Replace the Omnichannel queue model observe with Stream (#16999)
  [FIX]  Keeps the agent in the room after accepting a new Omnichannel request (#16787)
  [Regression] Replace the Omnichannel queue model observe with Stream (#16999)
  [NEW] Engagement Dashboard (#16960)
  Fix StreamCast info (#16995)
  [IMPROVE] Ability to change offline message button link on emails notifications (#16784)
  Bump version to 3.0.5
  [FIX] Race conditions on/before login (#16989)
  [FIX] Race conditions on/before login (#16989)
  Fix: StreamCast was not working correctly (#16983)
  ...
@sampaiodiego sampaiodiego mentioned this pull request Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants