Log unread message timestamps

// FREEBIE
This commit is contained in:
lilia 2016-04-11 15:08:44 -07:00
parent bb2868f1ec
commit 18012688ea

View file

@ -46,6 +46,9 @@
countUnread: function() {
return this.getUnread().then(function(unreadMessages) {
this.save({unreadCount: unreadMessages.length});
if (unreadMessages.length) {
console.log(this.id, 'unread messages:', unreadMessages.pluck('sent_at'));
}
}.bind(this));
},