diff --git a/src/Socket/chats.ts b/src/Socket/chats.ts index 86c3393..433e2ce 100644 --- a/src/Socket/chats.ts +++ b/src/Socket/chats.ts @@ -896,7 +896,6 @@ export const makeChatsSocket = (config: SocketConfig) => { keyStore: authState.keys, logger, options: config.options, - getMessage: config.getMessage, } ) ]) diff --git a/src/Utils/process-message.ts b/src/Utils/process-message.ts index 6e47a36..c1267d1 100644 --- a/src/Utils/process-message.ts +++ b/src/Utils/process-message.ts @@ -1,10 +1,10 @@ import { AxiosRequestConfig } from 'axios' import { proto } from '../../WAProto' -import { AuthenticationCreds, BaileysEventEmitter, CacheStore, Chat, GroupMetadata, ParticipantAction, RequestJoinAction, RequestJoinMethod, SignalKeyStoreWithTransaction, SocketConfig, WAMessageStubType } from '../Types' +import { AuthenticationCreds, BaileysEventEmitter, CacheStore, Chat, GroupMetadata, ParticipantAction, RequestJoinAction, RequestJoinMethod, SignalKeyStoreWithTransaction, WAMessageStubType } from '../Types' import { getContentType, normalizeMessageContent } from '../Utils/messages' import { areJidsSameUser, isJidBroadcast, isJidStatusBroadcast, jidNormalizedUser } from '../WABinary' import { aesDecryptGCM, hmacSign } from './crypto' -import { getKeyAuthor, toNumber } from './generics' +import { toNumber } from './generics' import { downloadAndProcessHistorySyncNotification } from './history' import { ILogger } from './logger' @@ -14,7 +14,6 @@ type ProcessMessageContext = { creds: AuthenticationCreds keyStore: SignalKeyStoreWithTransaction ev: BaileysEventEmitter - getMessage: SocketConfig['getMessage'] logger?: ILogger options: AxiosRequestConfig<{}> } @@ -158,8 +157,7 @@ const processMessage = async( creds, keyStore, logger, - options, - getMessage + options }: ProcessMessageContext ) => { const meId = creds.me!.id @@ -418,9 +416,11 @@ const processMessage = async( break } - } else if(content?.pollUpdateMessage) { + } /* else if(content?.pollUpdateMessage) { const creationMsgKey = content.pollUpdateMessage.pollCreationMessageKey! // we need to fetch the poll creation message to get the poll enc key + // TODO: make standalone, remove getMessage reference + // TODO: Remove entirely const pollMsg = await getMessage(creationMsgKey) if(pollMsg) { const meIdNormalised = jidNormalizedUser(meId) @@ -464,7 +464,7 @@ const processMessage = async( 'poll creation message not found, cannot decrypt update' ) } - } + } */ if(Object.keys(chat).length > 1) { ev.emit('chats.update', [chat])