From 6c3958bb16596bebb8f2097b0fce1f5a966c7d6b Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Sun, 9 Oct 2022 12:21:44 +0530 Subject: [PATCH] fix: desc for groups --- src/Socket/groups.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Socket/groups.ts b/src/Socket/groups.ts index 08d4a43..1c8dbcd 100644 --- a/src/Socket/groups.ts +++ b/src/Socket/groups.ts @@ -1,7 +1,7 @@ import { proto } from '../../WAProto' import { GroupMetadata, ParticipantAction, SocketConfig, WAMessageKey, WAMessageStubType } from '../Types' import { generateMessageID, unixTimestampSeconds } from '../Utils' -import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildren, jidEncode, jidNormalizedUser } from '../WABinary' +import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString, jidEncode, jidNormalizedUser } from '../WABinary' import { makeChatsSocket } from './chats' export const makeGroupsSocket = (config: SocketConfig) => { @@ -256,7 +256,7 @@ export const extractGroupMetadata = (result: BinaryNode) => { let desc: string | undefined let descId: string | undefined if(descChild) { - desc = getBinaryNodeChild(descChild, 'body')?.content as string + desc = getBinaryNodeChildString(descChild, 'body') descId = descChild.attrs.id }