diff --git a/src/api_data/advanced_group_api.rs b/src/api_data/advanced_group_api.rs index 5218072..3149c89 100644 --- a/src/api_data/advanced_group_api.rs +++ b/src/api_data/advanced_group_api.rs @@ -5,6 +5,7 @@ use serde::Serialize; use crate::api_data::conversation_api::ConversationAPI; use crate::api_data::group_api::GroupApi; +use crate::data::config::conf; use crate::data::error::ResultBoxError; use crate::data::group::Group; use crate::data::user::UserID; @@ -23,6 +24,7 @@ pub struct AdvancedGroupApi { number_likes: u64, is_liking: bool, conversations: Vec, + is_forez_group: bool, } impl AdvancedGroupApi { @@ -44,6 +46,7 @@ impl AdvancedGroupApi { number_likes: likes_helper::count(g.id.id(), LikeType::GROUP)? as u64, is_liking: likes_helper::is_liking(&user_id.unwrap_or(UserID::invalid()), g.id.id(), LikeType::GROUP)?, conversations: ConversationAPI::for_list(&conversations), + is_forez_group: conf().forez_groups.contains(&g.id), }) } } \ No newline at end of file