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'),
|
announce: !!getBinaryNodeChild(group, 'announcement'),
|
||||||
isCommunity: !!getBinaryNodeChild(group, 'parent'),
|
isCommunity: !!getBinaryNodeChild(group, 'parent'),
|
||||||
isCommunityAnnounce: !!getBinaryNodeChild(group, 'default_sub_group'),
|
isCommunityAnnounce: !!getBinaryNodeChild(group, 'default_sub_group'),
|
||||||
|
joinApprovalMode: !!getBinaryNodeChild(group, 'membership_approval_mode'),
|
||||||
memberAddMode,
|
memberAddMode,
|
||||||
participants: getBinaryNodeChildren(group, 'participant').map(
|
participants: getBinaryNodeChildren(group, 'participant').map(
|
||||||
({ attrs }) => {
|
({ attrs }) => {
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ export interface GroupMetadata {
|
|||||||
announce?: boolean
|
announce?: boolean
|
||||||
/** is set when the group also allows members to add participants */
|
/** is set when the group also allows members to add participants */
|
||||||
memberAddMode?: boolean
|
memberAddMode?: boolean
|
||||||
|
/** Request approval to join the group */
|
||||||
|
joinApprovalMode?: boolean
|
||||||
/** is this a community */
|
/** is this a community */
|
||||||
isCommunity?: boolean
|
isCommunity?: boolean
|
||||||
/** is this the announce of a community */
|
/** is this the announce of a community */
|
||||||
|
|||||||
Reference in New Issue
Block a user