Skip to content

Commit

Permalink
Use correct type on timer updates
Browse files Browse the repository at this point in the history
  • Loading branch information
liliakai committed Jan 26, 2017
1 parent 05ed7c3 commit d7f241d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/models/conversations.js
Expand Up @@ -200,7 +200,7 @@
this.save({ expireTimer: expireTimer });
var message = this.messageCollection.add({
conversationId : this.id,
type : 'outgoing',
type : received_at ? 'incoming' : 'outgoing',
sent_at : timestamp,
received_at : timestamp,
flags : textsecure.protobuf.DataMessage.Flags.EXPIRATION_TIMER_UPDATE,
Expand All @@ -213,7 +213,7 @@
message.set({destination: this.id});
}
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;
if (this.get('type') == 'private') {
sendFunc = textsecure.messaging.sendExpirationTimerUpdateToNumber;
Expand Down

0 comments on commit d7f241d

Please sign in to comment.