peertube-plugin-livechat
peertube-plugin-livechat copied to clipboard
Participants list shows recent chatters instead of only room occupants
Describe the bug Users who are not in the XMPP room show in the Participants list if they have a message in the loaded chat history. This is why it is regularly populated by many usernames of users who are not actually present.
To Reproduce Steps to reproduce the behavior:
- Go to an offline video / live with a chat which no one is watching, but where users were chatting previously.
- Observe that the participants list shows an entry for everyone who has messages in the chat history.
- Scroll the chat up to load more messages (if the configured chat history is long enough).
- If loading older messages shows posts from users who were not in the Participants list before, they suddenly appear there.
Expected behavior The participants list should be a list of XMPP users in the room. They should be removed from the room if their client doesn't respond to a regular ping.
Screenshots I've recorded a very short video demonstrating the issue.
https://tube.vencabot.com/w/8LcVq1ffUpuVjECYsqyh5U
Server (please complete the following information):
- Peertube version: 6.2.1
- Peertube installation type [e.g. standard, docker, ...]: standard
- peertube-plugin-livechat version: 10.3.3
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Tested in LibreWolf (Firefox fork) and Safari
- Version: updated
Additional context I've been writing my own XMPP bot to interact with the livechat and doing lots of tests. I noticed that, when my bot users 'join' the room, they appear in the list of participants -- and when they 'leave' the room, they disappear from the list -- but then, when I reload the page, they're back in the participants list. I was trying to figure out why this is, and that's when I discovered this behavior. So, it does seem that the 'Participants' list includes users as they enter the room (I don't think they need to send a message) and it DOES remove them when they leave, but the bug seems to be that it adds users to the participants list when their chat messages are loaded, even if the actual user is long gone, so reloading the page populates the participants list with lots of users who have already left.
Maybe you're already familiar with this issue, in which case I apologize. I've become quite familiar with XMPP and Prosody by now, so if I can help in any way by doing more tests, trying different configurations, etc., please let me know. As always, thank you for everything that you've done for many instances like mine.