Make initial timestamp on a thread match the 1st message
This commit is contained in:
parent
f14cd2eed1
commit
fa4c385598
1 changed files with 4 additions and 2 deletions
|
@ -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});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue