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:
Bob
2024-01-19 13:31:35 -03:00
committed by GitHub
parent 504fe942ee
commit c41be3ac4f
2 changed files with 3 additions and 0 deletions

View File

@@ -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 }) => {

View File

@@ -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 */