The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/server/methods/hideRoom.coffee

9 lines
330 B

Meteor.methods
hideRoom: (roomId) ->
fromId = Meteor.userId()
# console.log '[methods] hideRoom -> '.green, 'fromId:', fromId, 'roomId:', roomId
unless Meteor.userId()?
throw new Meteor.Error 300, 'Usuário não logado'
ChatSubscription.update({ rid: roomId, 'u._id': Meteor.userId() }, { $unset: { ts: 1, f: 1 } })