Skip to content
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

[IMPROVE] Update system messages' behavior in rooms #22018

Merged
merged 23 commits into from Jun 16, 2021

Conversation

matheusbsilva137
Copy link
Contributor

Proposed changes (including videos or screenshots)

  • Update room's lastMessage when its "Hide System Messages" setting is updated;
  • Display system messages in the last message field (in the sidebar, using the extended view) -- iff the system message sent is not hidden in the room;
  • Send an alert to the room members when a system message is sent -- iff the system message sent is not hidden in the room;
  • Properly update a room's lastMessage field when the previous lastMessage is deleted -- system messages can now be set as last messages.

Issue(s)

Task - ClickUp

Steps to test or reproduce

  1. Go to Administration > Message > Hide System Messages and choose all the system messages you'd like to hide from all rooms;
  2. Select a room in the sidebar and access Room Information > Edit > Hide System Messages, enable this setting and choose the system messages you'd like to be hidden in this room (additional to the ones chosen in the administration page);
  3. Add or Remove a member from the room. If its corresponding system message is NOT hidden in the room, the room's last message will be updated (visible in the extended view mode sidebar) and an alert will be displayed to the other users in the room (it'll be moved up in the rooms list and its name will be in bold). Otherwise (if the message is not hidden in the room), it'll not be shown in the last message field and alerts won't be sent.

Further comments

The last message field (in the sidebar) displays the following message types (using i18n translation): uj (user joined), ul (user left), ut, livechat-close, livechat-started, room-archived, room-unarchived, room_e2e_enabled, room_e2e_disabled, au (user added), r (room name changed), ru (user removed), wm, user-muted, user-unmuted, subscription-role-added, subscription-role-removed.

@matheusbsilva137 matheusbsilva137 requested a review from a team May 12, 2021 18:52
@matheusbsilva137 matheusbsilva137 changed the title [IMPROVE] system messages [IMPROVE] Update system messages' behavior in rooms May 12, 2021
app/models/server/models/Rooms.js Outdated Show resolved Hide resolved
client/sidebar/RoomList/normalizeSidebarMessage.js Outdated Show resolved Hide resolved
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is working as expect when the system message is hidden in the room level, but when hiding a sysetm message using the admin setting, the room's lastMessage is still displaying it.

@pierre-lehnen-rc pierre-lehnen-rc merged commit 3afe072 into develop Jun 16, 2021
@pierre-lehnen-rc pierre-lehnen-rc deleted the sys-messages-rooms-list branch June 16, 2021 06:41
KevLehman added a commit that referenced this pull request Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants