From 7e290b4dfb7e7cdcbf151a7ede27ff54699b685a Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Mon, 23 May 2022 11:20:01 +0530 Subject: [PATCH] chore: reduce data required for cachedGroupMetadata --- src/Types/Message.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Types/Message.ts b/src/Types/Message.ts index bc55d89..023f597 100644 --- a/src/Types/Message.ts +++ b/src/Types/Message.ts @@ -129,13 +129,17 @@ export type AnyMessageContent = AnyRegularMessageContent | { disappearingMessagesInChat: boolean | number } +export type GroupMetadataParticipants = Pick + export type MessageRelayOptions = { + /** override the message ID with a custom provided 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 + /** additional attributes to add to the WA binary node */ additionalAttributes?: { [_: string]: string } - cachedGroupMetadata?: (jid: string) => Promise - //cachedDevices?: (jid: string) => Promise + /** cached group metadata, use to prevent redundant requests to WA & speed up msg sending */ + cachedGroupMetadata?: (jid: string) => Promise } export type MiscMessageGenerationOptions = {