Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MR414N-ID
GitHub Repository: MR414N-ID/botku2
Path: blob/master/node_modules/@adiwajshing/baileys/lib/Utils/process-message.d.ts
1129 views
1
import type { Logger } from 'pino';
2
import { proto } from '../../WAProto';
3
import { AuthenticationCreds, BaileysEventEmitter, InitialReceivedChatsState, SignalKeyStoreWithTransaction } from '../Types';
4
declare type ProcessMessageContext = {
5
historyCache: Set<string>;
6
recvChats: InitialReceivedChatsState;
7
downloadHistory: boolean;
8
creds: AuthenticationCreds;
9
keyStore: SignalKeyStoreWithTransaction;
10
ev: BaileysEventEmitter;
11
logger?: Logger;
12
};
13
/** Cleans a received message to further processing */
14
export declare const cleanMessage: (message: proto.IWebMessageInfo, meId: string) => void;
15
export declare const isRealMessage: (message: proto.IWebMessageInfo) => boolean;
16
export declare const shouldIncrementChatUnread: (message: proto.IWebMessageInfo) => boolean;
17
declare const processMessage: (message: proto.IWebMessageInfo, { downloadHistory, ev, historyCache, recvChats, creds, keyStore, logger }: ProcessMessageContext) => Promise<void>;
18
export default processMessage;
19
20