Fix: cachedGroupMetadata (#846)

* Update Socket.ts

* Update Message.ts

* Update messages-send.ts

* Update index.ts

* Update messages-send.ts

* Update messages-send.ts

* Update messages-send.ts

* Update messages-send.ts

* Update Message.ts

* Update Socket.ts

* Update messages-send.ts

* Update messages-send.ts

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
This commit is contained in:
Bob
2024-08-14 06:08:36 -03:00
committed by GitHub
parent 1f9cfb1cba
commit 2dc1afa4ff
4 changed files with 19 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ import type { Logger } from 'pino'
import type { URL } from 'url'
import { proto } from '../../WAProto'
import { AuthenticationState, SignalAuthState, TransactionCapabilityOptions } from './Auth'
import { GroupMetadata } from './GroupMetadata'
import { MediaConnInfo } from './Message'
import { SignalRepository } from './Signal'
@@ -118,6 +119,9 @@ export type SocketConfig = {
* */
getMessage: (key: proto.IMessageKey) => Promise<proto.IMessage | undefined>
/** cached group metadata, use to prevent redundant requests to WA & speed up msg sending */
cachedGroupMetadata: (jid: string) => Promise<GroupMetadata | undefined>
makeSignalRepository: (auth: SignalAuthState) => SignalRepository
/** Socket passthrough */