forked from External/greenlight
Include shared rooms in room count for search (#2470)
This commit is contained in:
@ -59,4 +59,11 @@ module RoomsHelper
|
||||
def hidden_format_public
|
||||
ENV.fetch("HIDDEN_FORMATS_PUBLIC", "").split(",")
|
||||
end
|
||||
|
||||
# Returns the total number of visibile rooms for the current user
|
||||
def total_room_count(user)
|
||||
total = user.rooms.length
|
||||
total += user.shared_rooms.length if shared_access_allowed
|
||||
total
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user