Use correct type on timer updates
This commit is contained in:
parent
05ed7c3822
commit
d7f241ddee
1 changed files with 2 additions and 2 deletions
|
@ -200,7 +200,7 @@
|
||||||
this.save({ expireTimer: expireTimer });
|
this.save({ expireTimer: expireTimer });
|
||||||
var message = this.messageCollection.add({
|
var message = this.messageCollection.add({
|
||||||
conversationId : this.id,
|
conversationId : this.id,
|
||||||
type : 'outgoing',
|
type : received_at ? 'incoming' : 'outgoing',
|
||||||
sent_at : timestamp,
|
sent_at : timestamp,
|
||||||
received_at : timestamp,
|
received_at : timestamp,
|
||||||
flags : textsecure.protobuf.DataMessage.Flags.EXPIRATION_TIMER_UPDATE,
|
flags : textsecure.protobuf.DataMessage.Flags.EXPIRATION_TIMER_UPDATE,
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
message.set({destination: this.id});
|
message.set({destination: this.id});
|
||||||
}
|
}
|
||||||
message.save();
|
message.save();
|
||||||
if (!received_at) { // outgoing update, send it to the number/group
|
if (message.isOutgoing()) { // outgoing update, send it to the number/group
|
||||||
var sendFunc;
|
var sendFunc;
|
||||||
if (this.get('type') == 'private') {
|
if (this.get('type') == 'private') {
|
||||||
sendFunc = textsecure.messaging.sendExpirationTimerUpdateToNumber;
|
sendFunc = textsecure.messaging.sendExpirationTimerUpdateToNumber;
|
||||||
|
|
Loading…
Reference in a new issue