Migrate schema to service ids

This commit is contained in:
Fedor Indutny 2023-08-16 22:54:39 +02:00 committed by Jamie Kyle
parent 71958f8a01
commit 8b0da36caa
258 changed files with 4795 additions and 2613 deletions

View file

@ -59,20 +59,20 @@ export async function sendReceipts({
const receiptsBySenderId: Map<string, Array<Receipt>> = receipts.reduce(
(result, receipt) => {
const { senderE164, senderUuid } = receipt;
if (!senderE164 && !senderUuid) {
log.error('no sender E164 or UUID. Skipping this receipt');
const { senderE164, senderAci } = receipt;
if (!senderE164 && !senderAci) {
log.error('no sender E164 or Service Id. Skipping this receipt');
return result;
}
const sender = window.ConversationController.lookupOrCreate({
e164: senderE164,
uuid: senderUuid,
serviceId: senderAci,
reason: 'sendReceipts',
});
if (!sender) {
throw new Error(
'no conversation found with that E164/UUID. Cannot send this receipt'
'no conversation found with that E164/Service Id. Cannot send this receipt'
);
}
@ -135,7 +135,7 @@ export async function sendReceipts({
await handleMessageSend(
messaging[methodName]({
senderServiceId: senderAci,
senderAci,
isDirectConversation,
timestamps,
options: sendOptions,