FEATURE: Allow admins to access group chats (#31440)

In #31366, we added the ability for admins to remove people from group chats. However, that only works as long as the admin is already in the group chat.

For forum-side group messages, admins can join any of them at will. This PR extends that same ability to chat for parity.
This commit is contained in:
Ted Johansson
2025-03-03 09:20:13 +08:00
committed by GitHub
parent 258dfab8d7
commit c0bbff598a
2 changed files with 36 additions and 1 deletions

View File

@ -27,7 +27,7 @@ module Chat
end
def user_can_access?(user)
users.include?(user)
users.include?(user) || group? && user.admin?
end
def chat_channel_title_for_user(chat_channel, acting_user)