Skip to content

Commit

Permalink
add linkedParent in groupMetadata (#734)
Browse files Browse the repository at this point in the history
* Update GroupMetadata.ts

* Update groups.ts
  • Loading branch information
juniorkrz authored Apr 28, 2024
1 parent 495bb67 commit e52570b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Socket/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 2 additions & 0 deletions src/Types/GroupMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit e52570b

Please sign in to comment.