mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 16:45:17 +00:00
Returns group visibility
This commit is contained in:
@ -18,6 +18,15 @@ class GroupsController {
|
||||
4 => "visitor"
|
||||
);
|
||||
|
||||
/**
|
||||
* API groups visibility levels
|
||||
*/
|
||||
const GROUPS_VISIBILITY_LEVELS = array(
|
||||
GroupInfo::OPEN_GROUP => "open",
|
||||
GroupInfo::PRIVATE_GROUP => "private",
|
||||
GroupInfo::SECRET_GROUP => "secrete"
|
||||
);
|
||||
|
||||
/**
|
||||
* Create a group
|
||||
*
|
||||
@ -228,6 +237,7 @@ class GroupsController {
|
||||
$data["icon_url"] = $info->get_logo_url();
|
||||
$data["number_members"] = $info->get_number_members();
|
||||
$data["membership"] = self::GROUPS_MEMBERSHIP_LEVELS[$info->get_membership_level()];
|
||||
$data["visibility"] = self::GROUPS_VISIBILITY_LEVELS[$info->get_visibility()];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
Reference in New Issue
Block a user