mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Group#mentionable
and Group#messageable
not fully working.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class GroupShowSerializer < BasicGroupSerializer
|
||||
attributes :is_group_user, :is_group_owner, :mentionable
|
||||
attributes :is_group_user, :is_group_owner, :mentionable, :messageable
|
||||
|
||||
def include_is_group_user?
|
||||
authenticated?
|
||||
@@ -21,6 +21,10 @@ class GroupShowSerializer < BasicGroupSerializer
|
||||
authenticated?
|
||||
end
|
||||
|
||||
def include_messageable?
|
||||
authenticated?
|
||||
end
|
||||
|
||||
def mentionable
|
||||
Group.mentionable(scope.user).exists?(id: object.id)
|
||||
end
|
||||
|
Reference in New Issue
Block a user