Skip to content

Commit

Permalink
Fix late view/read sync logic
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Aug 16, 2021
1 parent 9625150 commit e7be409
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ts/models/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3284,7 +3284,10 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {

const viewSyncs = ViewSyncs.getSingleton().forMessage(message);

if (message.get('expireTimer')) {
if (
(readSyncs.length !== 0 || viewSyncs.length !== 0) &&
message.get('expireTimer')
) {
const existingExpirationStartTimestamp = message.get(
'expirationStartTimestamp'
);
Expand Down

0 comments on commit e7be409

Please sign in to comment.