diff --git a/src/Socket/chats.ts b/src/Socket/chats.ts index 8a3622f..91a9ee1 100644 --- a/src/Socket/chats.ts +++ b/src/Socket/chats.ts @@ -135,7 +135,8 @@ export const makeChatsSocket = (config: SocketConfig) => { type: 'get' } }) - return result.content[0].content.map(i => i.attrs.jid) + const child = result.content?.[0] as BinaryNode + return (child.content as BinaryNode[])?.map(i => i.attrs.jid) } const updateBlockStatus = async(jid: string, action: 'block' | 'unblock') => {