chore: reduce data required for cachedGroupMetadata

This commit is contained in:
Adhiraj Singh
2022-05-23 11:20:01 +05:30
parent 06437e182d
commit 7e290b4dfb

View File

@@ -129,13 +129,17 @@ export type AnyMessageContent = AnyRegularMessageContent | {
disappearingMessagesInChat: boolean | number disappearingMessagesInChat: boolean | number
} }
export type GroupMetadataParticipants = Pick<GroupMetadata, 'participants'>
export type MessageRelayOptions = { export type MessageRelayOptions = {
/** override the message ID with a custom provided string */
messageId?: string messageId?: string
/** only send to a specific participant */ /** only send to a specific participant; used when a message decryption fails for a single user */
participant?: string participant?: string
/** additional attributes to add to the WA binary node */
additionalAttributes?: { [_: string]: string } additionalAttributes?: { [_: string]: string }
cachedGroupMetadata?: (jid: string) => Promise<GroupMetadata | undefined> /** cached group metadata, use to prevent redundant requests to WA & speed up msg sending */
//cachedDevices?: (jid: string) => Promise<string[] | undefined> cachedGroupMetadata?: (jid: string) => Promise<GroupMetadataParticipants | undefined>
} }
export type MiscMessageGenerationOptions = { export type MiscMessageGenerationOptions = {