Skip to content

Commit e52570b

Browse files
authored
add linkedParent in groupMetadata (#734)
* Update GroupMetadata.ts * Update groups.ts
1 parent 495bb67 commit e52570b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Socket/groups.ts

+1
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ export const extractGroupMetadata = (result: BinaryNode) => {
335335
owner: group.attrs.creator ? jidNormalizedUser(group.attrs.creator) : undefined,
336336
desc,
337337
descId,
338+
linkedParent: getBinaryNodeChild(group, 'linked_parent')?.attrs.jid || undefined,
338339
restrict: !!getBinaryNodeChild(group, 'locked'),
339340
announce: !!getBinaryNodeChild(group, 'announcement'),
340341
isCommunity: !!getBinaryNodeChild(group, 'parent'),

src/Types/GroupMetadata.ts

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export interface GroupMetadata {
1616
desc?: string
1717
descOwner?: string
1818
descId?: string
19+
/** if this group is part of a community, it returns the jid of the community to which it belongs */
20+
linkedParent?: string
1921
/** is set when the group only allows admins to change group settings */
2022
restrict?: boolean
2123
/** is set when the group only allows admins to write messages */

0 commit comments

Comments
 (0)