Changes to View Once

This commit is contained in:
Scott Nonnenberg 2019-08-05 13:53:15 -07:00
parent 9d88abdb90
commit d42eb2126e
14 changed files with 152 additions and 167 deletions

View file

@ -745,7 +745,7 @@ MessageSender.prototype = {
return Promise.resolve();
},
async syncMessageTimerRead(sender, timestamp, options) {
async syncViewOnceOpen(sender, timestamp, options) {
const myNumber = textsecure.storage.user.getNumber();
const myDevice = textsecure.storage.user.getDeviceId();
if (myDevice === 1 || myDevice === '1') {
@ -754,10 +754,10 @@ MessageSender.prototype = {
const syncMessage = this.createSyncMessage();
const messageTimerRead = new textsecure.protobuf.SyncMessage.MessageTimerRead();
messageTimerRead.sender = sender;
messageTimerRead.timestamp = timestamp;
syncMessage.messageTimerRead = messageTimerRead;
const viewOnceOpen = new textsecure.protobuf.SyncMessage.ViewOnceOpen();
viewOnceOpen.sender = sender;
viewOnceOpen.timestamp = timestamp;
syncMessage.viewOnceOpen = viewOnceOpen;
const contentMessage = new textsecure.protobuf.Content();
contentMessage.syncMessage = syncMessage;
@ -1260,7 +1260,7 @@ textsecure.MessageSender = function MessageSenderWrapper(username, password) {
this.getSticker = sender.getSticker.bind(sender);
this.getStickerPackManifest = sender.getStickerPackManifest.bind(sender);
this.sendStickerPackSync = sender.sendStickerPackSync.bind(sender);
this.syncMessageTimerRead = sender.syncMessageTimerRead.bind(sender);
this.syncViewOnceOpen = sender.syncViewOnceOpen.bind(sender);
};
textsecure.MessageSender.prototype = {