1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-29 08:46:27 +00:00

Add missing information to conversations

This commit is contained in:
Pierre HUBERT 2021-04-05 15:01:58 +02:00
parent 16ba9486f7
commit a7b3329226

View File

@ -25,6 +25,7 @@ pub struct ConversationAPI {
color: Option<String>, color: Option<String>,
logo: Option<String>, logo: Option<String>,
group_id: Option<u64>, group_id: Option<u64>,
group_min_membership_level: Option<String>,
members: Vec<ConversationMembersAPI>, members: Vec<ConversationMembersAPI>,
can_everyone_add_members: bool, can_everyone_add_members: bool,
can_have_call: bool, can_have_call: bool,
@ -55,7 +56,10 @@ impl ConversationAPI {
can_everyone_add_members: conv.can_everyone_add_members, can_everyone_add_members: conv.can_everyone_add_members,
color: conv.color.clone(), color: conv.color.clone(),
logo: conv.logo.as_ref().map(|s| user_data_url(s)), logo: conv.logo.as_ref().map(|s| user_data_url(s)),
group_id: conv.group_id.as_ref().map(|i| i.id()), group_id: conv.group_id.as_ref().map(|i| i.id()),
group_min_membership_level: conv.min_group_membership_level.as_ref()
.map(|f| f.to_api()),
can_have_call: calls_helper::can_have_call(conv), can_have_call: calls_helper::can_have_call(conv),
can_have_video_call: calls_helper::can_have_video_calls(conv), can_have_video_call: calls_helper::can_have_video_calls(conv),