|
|
|
@ -97,7 +97,7 @@ RocketChat.models.Rooms.cache.on('sync', (type, room/*, diff*/) => { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
RocketChat.models.Subscriptions.on('changed', (type, subscription/*, diff*/) => { |
|
|
|
|
if (type === 'inserted') { |
|
|
|
|
if (type === 'inserted' || type === 'removed') { |
|
|
|
|
const room = RocketChat.models.Rooms.findOneById(subscription.rid); |
|
|
|
|
if (room) { |
|
|
|
|
RocketChat.Notifications.notifyUserInThisInstance(subscription.u._id, 'rooms-changed', type, roomMap({_room: room})); |
|
|
|
|