Expiring messages: destroy only after we've notified conversation
FREEBIE
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
var expired = new Whisper.MessageCollection();
|
||||
expired.on('add', function(message) {
|
||||
console.log('message', message.get('sent_at'), 'expired');
|
||||
message.destroy();
|
||||
message.getConversation().trigger('expired', message);
|
||||
message.destroy();
|
||||
});
|
||||
expired.on('reset', checkExpiringMessages);
|
||||
|
||||
|
Reference in New Issue
Block a user