From 47b2f6dd413e649eaf62b29ef7a0c69ed370b436 Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Sat, 28 Sep 2024 14:26:54 +0300 Subject: [PATCH] fix(master): Small fix to the profile picture endpoints --- src/Socket/chats.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Socket/chats.ts b/src/Socket/chats.ts index 38ee669..0ca11d7 100644 --- a/src/Socket/chats.ts +++ b/src/Socket/chats.ts @@ -221,13 +221,13 @@ export const makeChatsSocket = (config: SocketConfig) => { /** update the profile picture for yourself or a group */ const updateProfilePicture = async(jid: string, content: WAMediaUpload) => { - let targetJid = '' + let targetJid; if(!jid) { throw new Boom('Illegal no-jid profile update. Please specify either your ID or the ID of the chat you wish to update') } if(jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me!.id)) { - targetJid = jid // in case it is someone other than us + targetJid = jidNormalizedUser(jid) // in case it is someone other than us } const { img } = await generateProfilePicture(content) @@ -251,13 +251,13 @@ export const makeChatsSocket = (config: SocketConfig) => { /** remove the profile picture for yourself or a group */ const removeProfilePicture = async(jid: string) => { - let targetJid = '' + let targetJid; if(!jid) { throw new Boom('Illegal no-jid profile update. Please specify either your ID or the ID of the chat you wish to update') } if(jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me!.id)) { - targetJid = jid // in case it is someone other than us + targetJid = jidNormalizedUser(jid) // in case it is someone other than us } await query({