mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FIX: correctly shows as disabled a user who can't chat (#26010)
Prior to this fix we were checking if user was not part of a group which allows to chat, but we were not checking if this user was part of groups who can use direct messages.
This commit is contained in:
@ -5,7 +5,7 @@ module Chat
|
||||
attributes :can_chat, :has_chat_enabled
|
||||
|
||||
def can_chat
|
||||
SiteSetting.chat_enabled && scope.can_chat?
|
||||
SiteSetting.chat_enabled && object.guardian.can_chat? && object.guardian.can_direct_message?
|
||||
end
|
||||
|
||||
def has_chat_enabled
|
||||
|
Reference in New Issue
Block a user