Deduplicate and cancel unneeded retry requests

This commit is contained in:
Scott Nonnenberg 2024-10-01 08:23:32 +10:00 committed by GitHub
parent d1f130e542
commit b68e731950
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 473 additions and 161 deletions

View file

@ -140,6 +140,21 @@ export class DeliveryEvent extends ConfirmableEvent {
}
}
export type SuccessfulDecryptEventData = Readonly<{
senderDevice: number;
senderAci: AciString;
timestamp: number;
}>;
export class SuccessfulDecryptEvent extends ConfirmableEvent {
constructor(
public readonly data: SuccessfulDecryptEventData,
confirm: ConfirmCallback
) {
super('successful-decrypt', confirm);
}
}
export type DecryptionErrorEventData = Readonly<{
cipherTextBytes?: Uint8Array;
cipherTextType?: number;