ngx-chat icon indicating copy to clipboard operation
ngx-chat copied to clipboard

After reconnect and join room the "old" user resource is still in the room

Open juergen83 opened this issue 2 years ago • 2 comments

Hi. I find out (maybe since version 0.14.14) that the already joined user in a/some room(s) after page refresh/reconnect joining the same room(s) with the new resource ID but don't kill the last session. The main problem of this issue is the limit of room members on Jabber server. After multiple page refreshes the user can't join any room because of the dead session on its.

Anyone have the same problem?

BR Juergen

juergen83 avatar Jan 20 '23 11:01 juergen83

Now, I tested the old package of ngx-chat (0.12.0) and the new one (0.14.14) with all dependencies (Angular 12/14). At the end I have an unambiguous result: The old package works correct. The user leave and join a room after every server reconnect (every join with another resource ID) The new package works incorrect. The user does not leave the joined room(s) after reconnect and be joined with another resource ID.

I tried to fix this bug and wanted to leave every room after reconnect, but because of the new resource ID the old resource could not be found...

Someone have a suggestion for me?

juergen83 avatar Jan 23 '23 12:01 juergen83

Currently we had to refactor a lot of code, and finally started to create some test coverage. The current master version has untested MUC support.

When fixing the MUC plugin I will extend the tests to also test against dead ressources / member creation in rooms.

CodeBast4rd avatar Apr 24 '23 17:04 CodeBast4rd