mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: If need approval to join the group in groupMetadata (#533)
* If need approval to join the group * If need approval to join the group * Update groups.ts * Update groups.ts * fix lint * Update groups.ts * Update groups.ts --------- Co-authored-by: Bob <115008575+FortisEtMagnus@users.noreply.github.com> Co-authored-by: Bob <115008575+bobpetrov@users.noreply.github.com>
This commit is contained in:
@@ -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 }) => {
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user