|
|
|
|
@ -80,7 +80,18 @@ Meteor.startup -> |
|
|
|
|
removed: (data) -> |
|
|
|
|
KonchatNotification.removeRoomNotification(data.rid) |
|
|
|
|
|
|
|
|
|
updateUnread = (unreadCount) -> |
|
|
|
|
rxFavico.set 'type', 'warn' |
|
|
|
|
rxFavico.set 'count', unreadCount |
|
|
|
|
if unreadCount > 0 |
|
|
|
|
document.title = '(' + unreadCount + ') Rocket.Chat' |
|
|
|
|
else |
|
|
|
|
document.title = 'Rocket.Chat' |
|
|
|
|
|
|
|
|
|
ChatSubscription.find({}, { fields: { unread: 1 } }).observeChanges |
|
|
|
|
added: (id, fields) -> |
|
|
|
|
updateUnread(fields.unread) |
|
|
|
|
|
|
|
|
|
changed: (id, fields) -> |
|
|
|
|
if fields.unread and fields.unread > 0 |
|
|
|
|
|
|
|
|
|
@ -89,5 +100,7 @@ Meteor.startup -> |
|
|
|
|
|
|
|
|
|
KonchatNotification.newMessage() |
|
|
|
|
|
|
|
|
|
updateUnread(fields.unread) |
|
|
|
|
|
|
|
|
|
# Add ascii support to emojione |
|
|
|
|
emojione?.ascii = true |
|
|
|
|
emojione?.ascii = true |
|
|
|
|
|