Remove expired message if it expired during database fetch (#1983)
* Log SyncMessage destination, even if it's a group * Remove disappearing message even if deleted during fetch This change fixes a potential race condition with disappearing message removal from the UI. If the UI is in the middle of making a database request for messages to display, then we need to wait for that to complete before removing the newly-deleted expired message.
This commit is contained in:
parent
b2a3a0e679
commit
fb2ebddaa3
2 changed files with 23 additions and 3 deletions
|
@ -595,8 +595,12 @@ MessageReceiver.prototype.extend({
|
|||
}
|
||||
if (syncMessage.sent) {
|
||||
var sentMessage = syncMessage.sent;
|
||||
var to = sentMessage.message.group
|
||||
? 'group(' + sentMessage.message.group.id.toBinary() + ')'
|
||||
: sentMessage.destination;
|
||||
|
||||
console.log('sent message to',
|
||||
sentMessage.destination,
|
||||
to,
|
||||
sentMessage.timestamp.toNumber(),
|
||||
'from',
|
||||
this.getEnvelopeId(envelope)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue