-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
"Hide System Messages" not honored by stream-room-messages #26920
Comments
I’ve looked through
AFAICT, these all work. I’m not sure which of these are for fetching message history during proactive fetches from the server (e.g. during pageload / scrollback) vs. received on the |
I've implemented an ugly workaround by filtering it out client-side in
It's ugly for three reasons:
|
Hi @nmagedman thank you for submitting the issue. We fixed this Pull Request: #27151 and will be released in the next release. Thank you! |
Description:
Certain events create messages which are displayed in the chat conversation along with user-generated messages, e.g. "User Alice added by Bob". The settings page /admin/settings/Message has a section Hide System Messages, with a multiselect of Hide “Foo” messages. When we set, for example, Hide "User Added" messages, those messages still exist in the database (and perhaps are still sent to the client?), but they are not displayed to the user.
After a recent upgrade from 4.8.4 to 5.1.2, that hiding stopped working in certain situations. It works for messages that are loaded on the initial page load or when scrolling back, but the messages are not hidden when received as part of the websocket event feed, that is, while the user is actively online in the room.
Steps to reproduce:
Prepare two web browsers, so we can have multiple, concurrent sessions during this exercise, logged in as two different users.
In browser 1, log in as an Admin
Go to /admin/settings/Message and add “Hide "User Added" Messages” to the “Hide System Messages” list
![RC Config - Hide System Messages](https://user-images.githubusercontent.com/1042298/191728385-0969b619-9939-4289-bac5-f9ae61eca76c.png)
Ensure that user "A" is in a given chat room and that user "B" is not.
In browser 2, log in as user "A" and sit in that same chat room
In browser 1 (Admin), add user "B" to the chat room
In browser 2 (user A), notice that the "User B added by Admin" message is posted to the room.
![User Added By shown in stream-room-messages](https://user-images.githubusercontent.com/1042298/191728721-717803ff-bbb1-4c00-8577-9b53461a810d.png)
In browser 2 (user A), reload the page. Notice that the "User B added by Admin" is no longer visible.
![User Added By gone after refresh](https://user-images.githubusercontent.com/1042298/191728766-dd8d15a0-c970-4a15-a96f-78e8324386cb.png)
Expected behavior:
The "User B added by Admin" message should not be visible at any time, neither by users who are logged in at the time of the "au" event nor by users who enter the chatroom afterward.
Actual behavior:
The "User B added by Admin" message is (incorrectly) shown to users who are logged in at the time of the "au" event. It is (correctly) not shown to users who enter the chatroom afterward.
Server Setup Information:
Client Setup Information
Additional context
Recently upgraded RC from v4.8.4 to v5.1.2. We started receiving reports of this "new" notification shortly afterward.
Relevant logs:
In Chrome's developer tools, the websocket shows the following message (formatted for readability)
The text was updated successfully, but these errors were encountered: