Notifications for a few merge-related scenarios

This commit is contained in:
Scott Nonnenberg 2022-12-05 14:46:54 -08:00 committed by GitHub
parent 78ce34b9d3
commit a49a6f2057
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 2764 additions and 553 deletions

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

@ -166,19 +166,21 @@ export type MessageAttributesType = {
id: string;
type:
| 'call-history'
| 'change-number-notification'
| 'chat-session-refreshed'
| 'conversation-merge'
| 'delivery-issue'
| 'group'
| 'group-v1-migration'
| 'group-v2-change'
| 'group'
| 'incoming'
| 'keychange'
| 'outgoing'
| 'phone-number-discovery'
| 'profile-change'
| 'story'
| 'timer-notification'
| 'universal-timer-notification'
| 'change-number-notification'
| 'verified-change';
body?: string;
attachments?: Array<AttachmentType>;
@ -207,6 +209,13 @@ export type MessageAttributesType = {
source?: string;
sourceUuid?: string;
};
phoneNumberDiscovery?: {
e164: string;
};
conversationMerge?: {
renderInfo: ConversationRenderInfoType;
};
// Legacy fields for timer update notification only
flags?: number;
groupV2Change?: GroupV2ChangeType;
@ -349,6 +358,7 @@ export type ConversationAttributesType = {
pendingUniversalTimer?: string;
username?: string;
shareMyPhoneNumber?: boolean;
previousIdentityKey?: string;
// Group-only
groupId?: string;
@ -409,6 +419,17 @@ export type ConversationAttributesType = {
};
/* eslint-enable camelcase */
export type ConversationRenderInfoType = Pick<
ConversationAttributesType,
| 'e164'
| 'name'
| 'profileFamilyName'
| 'profileName'
| 'systemGivenName'
| 'type'
| 'username'
>;
export type GroupV2MemberType = {
uuid: UUIDStringType;
role: MemberRoleEnum;