Skip to content
Snippets Groups Projects
Unverified Commit f2978b37 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Show correct data at admin/rooms

Closes #5620 #5538
parent 127c8c97
No related branches found
No related tags found
No related merge requests found
AdminChatRoom = new Meteor.Collection('rocketchat_room')
Template.adminRooms.helpers
isReady: ->
return Template.instance().ready?.get()
......@@ -10,10 +12,10 @@ Template.adminRooms.helpers
roomCount: ->
return Template.instance().rooms?().count()
name: ->
# if @t is 'c' or @t is 'p'
return @name
# else if @t is 'd'
# return @usernames.join ' x '
if @t is 'c' or @t is 'p'
return @name
else if @t is 'd'
return @usernames.join ' x '
type: ->
if @t is 'c'
return TAPi18n.__ 'Channel'
......@@ -86,7 +88,7 @@ Template.adminRooms.onCreated ->
if types.length
query['t'] = { $in: types }
return ChatRoom.find(query, { limit: instance.limit?.get(), sort: { default: -1, name: 1 } })
return AdminChatRoom.find(query, { limit: instance.limit?.get(), sort: { default: -1, name: 1 } })
@getSearchTypes = ->
return _.map $('[name=room-type]:checked'), (input) -> return $(input).val()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment