Fix sync messages for voice notes
This commit is contained in:
parent
1d03b8e478
commit
e5a9bf0f7c
1 changed files with 11 additions and 5 deletions
|
@ -1863,16 +1863,19 @@ export const markViewed = (messageId: string): void => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const senderE164 = message.get('source');
|
const senderE164 = message.get('source');
|
||||||
const senderAci = message.get('sourceServiceId');
|
|
||||||
strictAssert(
|
|
||||||
isAciString(senderAci),
|
|
||||||
'Message sourceServiceId must be an ACI'
|
|
||||||
);
|
|
||||||
const timestamp = getMessageSentTimestamp(message.attributes, { log });
|
const timestamp = getMessageSentTimestamp(message.attributes, { log });
|
||||||
|
|
||||||
message.set(messageUpdaterMarkViewed(message.attributes, Date.now()));
|
message.set(messageUpdaterMarkViewed(message.attributes, Date.now()));
|
||||||
|
|
||||||
|
let senderAci: AciString;
|
||||||
if (isIncoming(message.attributes)) {
|
if (isIncoming(message.attributes)) {
|
||||||
|
const sourceServiceId = message.get('sourceServiceId');
|
||||||
|
strictAssert(
|
||||||
|
isAciString(sourceServiceId),
|
||||||
|
'Message sourceServiceId must be an ACI'
|
||||||
|
);
|
||||||
|
senderAci = sourceServiceId;
|
||||||
|
|
||||||
const convoAttributes = message.getConversation()?.attributes;
|
const convoAttributes = message.getConversation()?.attributes;
|
||||||
const conversationId = message.get('conversationId');
|
const conversationId = message.get('conversationId');
|
||||||
drop(
|
drop(
|
||||||
|
@ -1894,6 +1897,9 @@ export const markViewed = (messageId: string): void => {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
// Use our own ACI for syncing viewed state of an outgoing message.
|
||||||
|
senderAci = window.textsecure.storage.user.getCheckedAci();
|
||||||
}
|
}
|
||||||
|
|
||||||
drop(
|
drop(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue