Show challenge when requested by server

This commit is contained in:
Fedor Indutny 2021-05-05 17:09:29 -07:00 committed by GitHub
parent 03c68da17d
commit 986d8a66bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 1986 additions and 128 deletions

16
ts/model-types.d.ts vendored
View file

@ -13,6 +13,7 @@ import {
LastMessageStatus,
} from './state/ducks/conversations';
import { SendOptionsType } from './textsecure/SendMessage';
import { SendMessageChallengeData } from './textsecure/Errors';
import {
AccessRequiredEnum,
MemberRoleEnum,
@ -42,6 +43,8 @@ type TaskResultType = any;
export type CustomError = Error & {
identifier?: string;
number?: string;
data?: object;
retryAfter?: number;
};
export type GroupMigrationType = {
@ -62,6 +65,13 @@ export type QuotedMessageType = {
text: string;
};
export type RetryOptions = Readonly<{
type: 'session-reset';
uuid: string;
e164: string;
now: number;
}>;
export type MessageAttributesType = {
bodyPending: boolean;
bodyRanges: BodyRangesType;
@ -113,6 +123,7 @@ export type MessageAttributesType = {
}>;
read_by: Array<string | null>;
requiredProtocolVersion: number;
retryOptions?: RetryOptions;
sent: boolean;
sourceDevice: string | number;
snippet: unknown;
@ -325,6 +336,11 @@ export type VerificationOptions = {
viaSyncMessage?: boolean;
};
export type ShallowChallengeError = CustomError & {
readonly retryAfter: number;
readonly data: SendMessageChallengeData;
};
export declare class ConversationModelCollectionType extends Backbone.Collection<ConversationModel> {
resetLookups(): void;
}