Expire timer updates: don't send if updated via remote message (#2473)
A recent change removed the type property to make markRead() behave properly, but that broke our check 'should we send an update?' logic. So instead of using `isIncoming()` we now use the thing we previously used to determine whether a message was incoming: `receivedAt`.
This commit is contained in:
parent
2576c3fabe
commit
b113cd0ad2
1 changed files with 2 additions and 2 deletions
|
@ -925,11 +925,11 @@
|
||||||
wrapDeferred(message.save()),
|
wrapDeferred(message.save()),
|
||||||
wrapDeferred(this.save({ expireTimer })),
|
wrapDeferred(this.save({ expireTimer })),
|
||||||
]).then(() => {
|
]).then(() => {
|
||||||
if (message.isIncoming()) {
|
// if change was made remotely, don't send it to the number/group
|
||||||
|
if (receivedAt) {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
// change was made locally, send it to the number/group
|
|
||||||
let sendFunc;
|
let sendFunc;
|
||||||
if (this.get('type') === 'private') {
|
if (this.get('type') === 'private') {
|
||||||
sendFunc = textsecure.messaging.sendExpirationTimerUpdateToNumber;
|
sendFunc = textsecure.messaging.sendExpirationTimerUpdateToNumber;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue