add linkedParent in groupMetadata (#734)

* Update GroupMetadata.ts

* Update groups.ts
This commit is contained in:
Antônio Roberto Júnior
2024-04-28 08:02:49 -03:00
committed by GitHub
parent 495bb6775a
commit e52570bbd7
2 changed files with 3 additions and 0 deletions

View File

@@ -335,6 +335,7 @@ export const extractGroupMetadata = (result: BinaryNode) => {
owner: group.attrs.creator ? jidNormalizedUser(group.attrs.creator) : undefined,
desc,
descId,
linkedParent: getBinaryNodeChild(group, 'linked_parent')?.attrs.jid || undefined,
restrict: !!getBinaryNodeChild(group, 'locked'),
announce: !!getBinaryNodeChild(group, 'announcement'),
isCommunity: !!getBinaryNodeChild(group, 'parent'),

View File

@@ -16,6 +16,8 @@ export interface GroupMetadata {
desc?: string
descOwner?: string
descId?: string
/** if this group is part of a community, it returns the jid of the community to which it belongs */
linkedParent?: string
/** is set when the group only allows admins to change group settings */
restrict?: boolean
/** is set when the group only allows admins to write messages */