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

Not displayed the number of users and messages in private and public channels on the page /admin/rooms #12610

Closed
DRON4eg opened this issue Nov 13, 2018 · 8 comments · Fixed by #16680
Assignees
Milestone

Comments

@DRON4eg
Copy link

DRON4eg commented Nov 13, 2018

Description:

On the page
https://xxxxxx/admin/rooms
The current number of members of the channel or private group is not displayed, but the number of users in personal correspondence is displayed.
Also included recycling on this channel in the admin displays 1084 messages, and in fact there are only 10.

Actual behavior:

image
image
image

Server Setup Information:

  • Version of Rocket.Chat Server: 0.71.1
  • Operating System: Debina 9
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enable
  • NodeJS Version: 8.11.3
  • MongoDB Version: 4.0.4
@DRON4eg
Copy link
Author

DRON4eg commented Jul 1, 2019

version 1.2.1
The display of the number of users on the channel has been corrected.
But still the current number of messages in the chat is displayed.

@ggazzo ggazzo added this to the 2.3.0 milestone Oct 17, 2019
@ggazzo ggazzo modified the milestones: 2.3.0, 3.0.0 Jan 30, 2020
@gabriellsh
Copy link
Member

The message count still doesn't update after deleting/pruning messages.

@subham103
Copy link
Contributor

the current behavior is:

  1. the number of members is displayed correctly.
  2. when we add a new message to a channel the message count increases by 1 to the previous count.
  3. but when we delete a message the message count remains the same as the previous count

Should we need to fix only the message count problem when we delete the message or there are some other bugs unseen to me?
I want to work on this issue:)

@subham103
Copy link
Contributor

@gabriellsh this issue requires us to decrease the message count when we delete/prune messages, right? I think the issue with member count must have been solved previously. Please guide me to solve this issue:)

@subham103
Copy link
Contributor

also, the no of new message send to a user seen on the left-side panel doesn't update after deletion of a message by the sender. This issue requires us to solve this problem too, right?

@gabriellsh
Copy link
Member

Yes, that is correct, we should remove from the counter when messages are deleted/pruned. About the new messages, there's a setting to "Show deleted status", which when true, keeps a record that the message has been deleted. In these cases, both counters should keep their values, as the message is in the chat still, at least in some form.

Then theres pruning. When pruning the messages, even with that setting set to true, it removes the messages entirely. After pruning the messages the UI shows how many messages were pruned, I think it is only a matter of getting that value and subtracting it from the counter(s).

We have to think also if it is possible to just do a count() on the messages with the room id (it would do all the things I said automatically), but there could be performance issues.

@subham103
Copy link
Contributor

Ok, I want to work on this issue. I'm going to verify whether there is any count() exist or there is just a variable which we are updating btw I am pretty sure that it is a variable per room id which we are updating upon message insertion which doesn't change upon message deletion.
About implementing the count() method with the above-mentioned behaviour, I think we need to discuss whether we need that or not. It will be great to have it, but as you said, it's gonna take considerable amount of time.
IMO if this variable (message count for a room id) is being used in multiple places which are unable to access the dynamicity of this variable we should use the count() method otherwise it wouldn't be great to sacrifice the performance.

@subham103
Copy link
Contributor

subham103 commented Feb 19, 2020

@gabriellsh please review #16650 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment