revite icon indicating copy to clipboard operation
revite copied to clipboard

bug: Rejoining a server after being kicked does not update the member list

Open I2rys opened this issue 3 years ago • 4 comments

If you kick a user and make them join the server again the members does not load unless you refresh.

image

I2rys avatar Jun 07 '22 12:06 I2rys

Can't reproduce (tried it with nightly, and production), can you provide steps?

Below are the lines executed after server join https://github.com/revoltchat/revite/blob/67c8418c31a661bda82cb3ff728a80bd8dfcb7d4/src/pages/invite/Invite.tsx#L164-L174 specifically line 168, which doesn't differ from navigating to the server channel from the UI https://github.com/revoltchat/revite/blob/67c8418c31a661bda82cb3ff728a80bd8dfcb7d4/src/components/navigation/left/ServerSidebar.tsx#L99

so I am not sure what the issue is here

LedaThemis avatar Jun 07 '22 21:06 LedaThemis

@LedaThemis The one above is from the web and It's really strange because I tried it again now It loads the members also in Revolt desktop sometimes It does not load my servers & friends on start up and the "kick rejoin" affects Revolt desktop too.

image image image

I2rys avatar Jun 08 '22 00:06 I2rys

https://user-images.githubusercontent.com/87125939/172561886-8ce31ae2-22ea-4803-a281-67cf15e14561.mp4

I2rys avatar Jun 08 '22 07:06 I2rys

It seems that this only happens if the InviteEmbed is used, it doesn't happen if you join through URL

these commits seem to be related https://github.com/revoltchat/revite/commit/fc91a75acb48c85179c1387d50a05e8377ac390b https://github.com/revoltchat/revite/commit/1089651cb03033ac278458dbff697644ce33f331

there is a FIXME relating to this issue https://github.com/revoltchat/revite/blob/67c8418c31a661bda82cb3ff728a80bd8dfcb7d4/src/components/navigation/right/MemberSidebar.tsx#L184-L189

the cause of the issue is this useEffect https://github.com/revoltchat/revite/blob/67c8418c31a661bda82cb3ff728a80bd8dfcb7d4/src/components/navigation/right/MemberSidebar.tsx#L211-L219 where FETCHED isn't updated on member leave

LedaThemis avatar Jun 08 '22 12:06 LedaThemis

Closing due to rewrite, marking as potential issue in future by linking to https://github.com/revoltchat/frontend/issues/134.

insertish avatar Jan 24 '23 17:01 insertish