Make initial timestamp on a thread match the 1st message

This commit is contained in:
lilia 2014-10-16 14:13:03 -07:00
parent f14cd2eed1
commit fa4c385598

View file

@ -21,12 +21,14 @@ var Whisper = Whisper || {};
}, },
sendMessage: function(message) { sendMessage: function(message) {
var timestamp = Date.now();
this.messages().add({ type: 'outgoing', this.messages().add({ type: 'outgoing',
body: message, body: message,
threadId: this.id, threadId: this.id,
timestamp: new Date().getTime() }).save(); timestamp: timestamp }).save();
this.save({ timestamp: new Date().getTime(), this.save({ timestamp: timestamp,
unreadCount: 0, unreadCount: 0,
active: true}); active: true});