Insert inferred timer updates before the corresponding message
This commit is contained in:
parent
d52050d43f
commit
009098f8dd
2 changed files with 11 additions and 8 deletions
|
@ -179,17 +179,17 @@
|
|||
}
|
||||
},
|
||||
|
||||
addExpirationTimerUpdate: function(time, source) {
|
||||
var now = Date.now();
|
||||
this.save({ expireTimer: time });
|
||||
addExpirationTimerUpdate: function(expireTimer, source, received_at) {
|
||||
received_at = received_at || Date.now();
|
||||
this.save({ expireTimer: expireTimer });
|
||||
var message = this.messageCollection.add({
|
||||
conversationId : this.id,
|
||||
type : 'outgoing',
|
||||
sent_at : now,
|
||||
received_at : now,
|
||||
sent_at : received_at,
|
||||
received_at : received_at,
|
||||
flags : textsecure.protobuf.DataMessage.Flags.EXPIRATION_TIMER_UPDATE,
|
||||
expirationTimerUpdate : {
|
||||
expireTimer : time,
|
||||
expireTimer : expireTimer,
|
||||
source : source
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue