Use other sync messages for conversations missing ACI

This commit is contained in:
Scott Nonnenberg 2025-02-07 00:40:25 +10:00 committed by GitHub
commit c279108c75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 224 additions and 93 deletions

View file

@ -1796,6 +1796,40 @@ export default class MessageSender {
});
}
static getBlockSync(
options: Readonly<{
e164s: Array<string>;
acis: Array<string>;
groupIds: Array<Uint8Array>;
}>
): SingleProtoJobData {
const myAci = window.textsecure.storage.user.getCheckedAci();
const syncMessage = MessageSender.createSyncMessage();
const blocked = new Proto.SyncMessage.Blocked();
blocked.numbers = options.e164s;
blocked.acis = options.acis;
blocked.groupIds = options.groupIds;
syncMessage.blocked = blocked;
const contentMessage = new Proto.Content();
contentMessage.syncMessage = syncMessage;
const { ContentHint } = Proto.UnidentifiedSenderMessage.Message;
return {
contentHint: ContentHint.RESENDABLE,
serviceId: myAci,
isSyncMessage: true,
protoBase64: Bytes.toBase64(
Proto.Content.encode(contentMessage).finish()
),
type: 'blockSync',
urgent: false,
};
}
static getMessageRequestResponseSync(
options: Readonly<{
threadE164?: string;