diff --git a/src/Socket/groups.ts b/src/Socket/groups.ts index 030e70d..b7814a2 100644 --- a/src/Socket/groups.ts +++ b/src/Socket/groups.ts @@ -339,6 +339,7 @@ export const extractGroupMetadata = (result: BinaryNode) => { announce: !!getBinaryNodeChild(group, 'announcement'), isCommunity: !!getBinaryNodeChild(group, 'parent'), isCommunityAnnounce: !!getBinaryNodeChild(group, 'default_sub_group'), + joinApprovalMode: !!getBinaryNodeChild(group, 'membership_approval_mode'), memberAddMode, participants: getBinaryNodeChildren(group, 'participant').map( ({ attrs }) => { diff --git a/src/Types/GroupMetadata.ts b/src/Types/GroupMetadata.ts index d5b870c..db89688 100644 --- a/src/Types/GroupMetadata.ts +++ b/src/Types/GroupMetadata.ts @@ -22,6 +22,8 @@ export interface GroupMetadata { announce?: boolean /** is set when the group also allows members to add participants */ memberAddMode?: boolean + /** Request approval to join the group */ + joinApprovalMode?: boolean /** is this a community */ isCommunity?: boolean /** is this the announce of a community */