Use POJO instead of MessageModel in ConversationView quote logic

This commit is contained in:
Evan Hahn 2021-06-22 18:16:50 -05:00 committed by GitHub
parent c9b1ce6655
commit 6b2dfeb9f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 92 additions and 119 deletions

26
ts/window.d.ts vendored
View file

@ -220,8 +220,16 @@ declare global {
getRegionCodeForNumber: (number: string) => string;
parseNumber: (
e164: string,
regionCode: string
) => typeof window.Signal.Types.PhoneNumber;
defaultRegionCode: string
) =>
| { isValidNumber: false; error: unknown }
| {
isValidNumber: true;
regionCode: string | undefined;
countryCode: string;
nationalNumber: string;
e164: string;
};
};
parse: (number: string) => string;
getRegionCodeForNumber: (number: string) => string;
@ -400,20 +408,6 @@ declare global {
options: unknown
) => Promise<WhatIsThis>;
};
PhoneNumber: {
format: (
identifier: string,
options: Record<string, unknown>
) => string;
isValidNumber(
phoneNumber: string,
options?: {
regionCode?: string;
}
): boolean;
e164: string;
error: string;
};
Errors: typeof Errors;
Message: {
CURRENT_SCHEMA_VERSION: number;