Log unread message timestamps
// FREEBIE
This commit is contained in:
parent
bb2868f1ec
commit
18012688ea
1 changed files with 3 additions and 0 deletions
|
@ -46,6 +46,9 @@
|
||||||
countUnread: function() {
|
countUnread: function() {
|
||||||
return this.getUnread().then(function(unreadMessages) {
|
return this.getUnread().then(function(unreadMessages) {
|
||||||
this.save({unreadCount: unreadMessages.length});
|
this.save({unreadCount: unreadMessages.length});
|
||||||
|
if (unreadMessages.length) {
|
||||||
|
console.log(this.id, 'unread messages:', unreadMessages.pluck('sent_at'));
|
||||||
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue