From 1c77c00be5cb57f2dcb79f3f8b865723687afd59 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Tue, 8 Mar 2022 15:59:11 +0530 Subject: [PATCH] chore: minor types refactor on legacy presence update --- src/LegacySocket/chats.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LegacySocket/chats.ts b/src/LegacySocket/chats.ts index c4c497e..3500b2b 100644 --- a/src/LegacySocket/chats.ts +++ b/src/LegacySocket/chats.ts @@ -391,7 +391,7 @@ const makeChatsSocket = (config: LegacySocketConfig) => { * @param jid the ID of the person/group who you are updating * @param type your presence */ - sendPresenceUpdate: (type: WAPresence, jid: string | undefined) => ( + sendPresenceUpdate: (type: WAPresence, toJid?: string) => ( sendNode({ binaryTag: [WAMetric.presence, WAFlag[type]], // weird stuff WA does json: { @@ -400,7 +400,7 @@ const makeChatsSocket = (config: LegacySocketConfig) => { content: [ { tag: 'presence', - attrs: { type: type, to: jid } + attrs: { type: type, to: toJid } } ] }