Rocket.Chat.ReactNative icon indicating copy to clipboard operation
Rocket.Chat.ReactNative copied to clipboard

Duplicate members in the memberlist of a Channel/Team

Open try-catch-stack opened this issue 3 years ago • 11 comments

Description:

Members section of channels or teams does not show all unique members and shows some users multiple times.

Environment Information:

  • Rocket.Chat Server Version:
  • Rocket.Chat App Version:
  • Device Name:
  • OS Version:

Steps to reproduce:

  1. Got to members section of a channel/team.
  2. Scroll down to the bottom and you'll see that some members are present multiple times while some are not even once (Got to know by crosschecking from the web app).

Expected behavior:

All members of the channel/team should be displayed once.

Actual behavior:

Some members are present multiple times while some are not even once (Got to know by crosschecking from the web app).

https://user-images.githubusercontent.com/77742477/150386592-ce3aab7f-dbdb-462c-8f31-c458f49ec235.mp4

Additional context:

try-catch-stack avatar Jan 20 '22 17:01 try-catch-stack

@try-catch-stack

Got to know by crosschecking from the web app

Do you mean it happens on web too?

diegolmello avatar Jan 20 '22 17:01 diegolmello

@try-catch-stack

Got to know by crosschecking from the web app

Do you mean it happens on web too?

No it doesn't . I meant to say that to verify that some members are not shown , I cross checked from the web

try-catch-stack avatar Jan 20 '22 17:01 try-catch-stack

The bug is most probably related to the way members are fetched and the pagination( Offset and Page size). I tried by changing the page size (count) to greater than the members present and got the correct result.

try-catch-stack avatar Jan 20 '22 17:01 try-catch-stack

Got you. I've tested on a few rooms and it's working. Can you give us more details?

diegolmello avatar Jan 20 '22 17:01 diegolmello

Working? You mean the bug is for real right?

As I said above , the rooms with members<25 (Page size of the fetched members) should not have this issue.

try-catch-stack avatar Jan 20 '22 17:01 try-catch-stack

Ok, I was able to reproduce it on https://open.rocket.chat/channel/general

diegolmello avatar Jan 20 '22 17:01 diegolmello

@try-catch-stack Can you work on a fix?

diegolmello avatar Jan 20 '22 17:01 diegolmello

I tested the api endpoint /channels.members (Refered this ) using the same offset and count and this also happens to give duplicate results for example first we take 0 as offset and 25 as count and get a result . Then we take 25 as offset and 25 as count and this result contains some members which were also present in the first one.

try-catch-stack avatar Jan 20 '22 17:01 try-catch-stack

@try-catch-stack Can you work on a fix?

I have been trying to look for the fix for a while now and figured out this. I thought that some insights would help so created an issue here.

try-catch-stack avatar Jan 20 '22 17:01 try-catch-stack

Confirm that issue on latest 4.26.2 And here is a one more thing. When I scroll member list, I see some users 3 or 4 or even maybe 5 times, and in some moment user list is over, I see blank screen. And in that moment I guess another one set of duplicated users creates and I see them one more time. So, I never see other users.

ankar84 avatar Apr 04 '22 03:04 ankar84

Is this behavior still happening? If it does, can I pick this one?

guilhermedfs avatar Jul 31 '22 20:07 guilhermedfs