parent
74727bba8e
commit
ce5d8d4bb6
@ -1,3 +1,7 @@ |
||||
Meteor.methods |
||||
channelsList: -> |
||||
return { channels: RocketChat.models.Rooms.findByTypeAndArchivationState('c', false, { sort: { msgs:-1 } }).fetch() } |
||||
channelsList: (limit) -> |
||||
options = { sort: { msgs:-1 } } |
||||
if _.isNumber limit |
||||
options.limit = limit |
||||
|
||||
return { channels: RocketChat.models.Rooms.findByTypeAndArchivationState('c', false, options).fetch() } |
||||
|
||||
Loading…
Reference in new issue