onDecryptionError/onRetryRequest: Don't run until queue is empty
This commit is contained in:
parent
fe49edce8a
commit
51af6947d4
4 changed files with 114 additions and 75 deletions
|
@ -78,39 +78,6 @@ export class ErrorEvent extends Event {
|
|||
}
|
||||
}
|
||||
|
||||
export type DecryptionErrorEventData = Readonly<{
|
||||
cipherTextBytes?: Uint8Array;
|
||||
cipherTextType?: number;
|
||||
contentHint?: number;
|
||||
groupId?: string;
|
||||
receivedAtCounter: number;
|
||||
receivedAtDate: number;
|
||||
senderDevice: number;
|
||||
senderUuid: string;
|
||||
timestamp: number;
|
||||
}>;
|
||||
|
||||
export class DecryptionErrorEvent extends Event {
|
||||
constructor(public readonly decryptionError: DecryptionErrorEventData) {
|
||||
super('decryption-error');
|
||||
}
|
||||
}
|
||||
|
||||
export type RetryRequestEventData = Readonly<{
|
||||
groupId?: string;
|
||||
ratchetKey?: PublicKey;
|
||||
requesterUuid: string;
|
||||
requesterDevice: number;
|
||||
senderDevice: number;
|
||||
sentAt: number;
|
||||
}>;
|
||||
|
||||
export class RetryRequestEvent extends Event {
|
||||
constructor(public readonly retryRequest: RetryRequestEventData) {
|
||||
super('retry-request');
|
||||
}
|
||||
}
|
||||
|
||||
export class ContactEvent extends Event {
|
||||
constructor(public readonly contactDetails: ModifiedContactDetails) {
|
||||
super('contact');
|
||||
|
@ -175,6 +142,45 @@ export class DeliveryEvent extends ConfirmableEvent {
|
|||
}
|
||||
}
|
||||
|
||||
export type DecryptionErrorEventData = Readonly<{
|
||||
cipherTextBytes?: Uint8Array;
|
||||
cipherTextType?: number;
|
||||
contentHint?: number;
|
||||
groupId?: string;
|
||||
receivedAtCounter: number;
|
||||
receivedAtDate: number;
|
||||
senderDevice: number;
|
||||
senderUuid: string;
|
||||
timestamp: number;
|
||||
}>;
|
||||
|
||||
export class DecryptionErrorEvent extends ConfirmableEvent {
|
||||
constructor(
|
||||
public readonly decryptionError: DecryptionErrorEventData,
|
||||
confirm: ConfirmCallback
|
||||
) {
|
||||
super('decryption-error', confirm);
|
||||
}
|
||||
}
|
||||
|
||||
export type RetryRequestEventData = Readonly<{
|
||||
groupId?: string;
|
||||
ratchetKey?: PublicKey;
|
||||
requesterUuid: string;
|
||||
requesterDevice: number;
|
||||
senderDevice: number;
|
||||
sentAt: number;
|
||||
}>;
|
||||
|
||||
export class RetryRequestEvent extends ConfirmableEvent {
|
||||
constructor(
|
||||
public readonly retryRequest: RetryRequestEventData,
|
||||
confirm: ConfirmCallback
|
||||
) {
|
||||
super('retry-request', confirm);
|
||||
}
|
||||
}
|
||||
|
||||
export type SentEventData = Readonly<{
|
||||
destination?: string;
|
||||
destinationUuid?: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue