Receive support for View Once photos
This commit is contained in:
@@ -1110,11 +1110,19 @@ MessageReceiver.prototype.extend({
|
||||
return this.handleVerified(envelope, syncMessage.verified);
|
||||
} else if (syncMessage.configuration) {
|
||||
return this.handleConfiguration(envelope, syncMessage.configuration);
|
||||
} else if (syncMessage.stickerPackOperation) {
|
||||
} else if (
|
||||
syncMessage.stickerPackOperation &&
|
||||
syncMessage.stickerPackOperation.length > 0
|
||||
) {
|
||||
return this.handleStickerPackOperation(
|
||||
envelope,
|
||||
syncMessage.stickerPackOperation
|
||||
);
|
||||
} else if (syncMessage.messageTimerRead) {
|
||||
return this.handleMessageTimerRead(
|
||||
envelope,
|
||||
syncMessage.messageTimerRead
|
||||
);
|
||||
}
|
||||
throw new Error('Got empty SyncMessage');
|
||||
},
|
||||
@@ -1125,6 +1133,17 @@ MessageReceiver.prototype.extend({
|
||||
ev.configuration = configuration;
|
||||
return this.dispatchAndWait(ev);
|
||||
},
|
||||
handleMessageTimerRead(envelope, sync) {
|
||||
window.log.info('got message timer read sync message');
|
||||
|
||||
const ev = new Event('viewSync');
|
||||
ev.confirm = this.removeFromCache.bind(this, envelope);
|
||||
ev.source = sync.sender;
|
||||
ev.timestamp = sync.timestamp ? sync.timestamp.toNumber() : null;
|
||||
ev.viewedAt = envelope.timestamp;
|
||||
|
||||
return this.dispatchAndWait(ev);
|
||||
},
|
||||
handleStickerPackOperation(envelope, operations) {
|
||||
const ENUM = textsecure.protobuf.SyncMessage.StickerPackOperation.Type;
|
||||
window.log.info('got sticker pack operation sync message');
|
||||
|
Reference in New Issue
Block a user