1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-20 16:35:17 +00:00

Check out whether a conversations can be used for calls or not

This commit is contained in:
2021-02-08 18:14:15 +01:00
parent a2b2fc89cf
commit 01b83dfa8f
4 changed files with 43 additions and 3 deletions

View File

@ -5,6 +5,7 @@ use serde::{Serialize, Serializer};
use crate::api_data::legacy_api_bool::LegacyBool;
use crate::data::conversation::Conversation;
use crate::helpers::calls_helper;
/// Special implementation of conversation name (false if none / the name otherwise)
struct ConvName(Option<String>);
@ -48,9 +49,9 @@ impl ConversationAPI {
members: conv.members.iter().map(|x| x.id()).collect(),
canEveryoneAddMembers: conv.can_everyone_add_members,
can_have_call: calls_helper::can_have_call(conv),
can_have_video_call: calls_helper::can_have_video_calls(conv),
// TODO : update when call system is implemented
can_have_call: false,
can_have_video_call: false,
has_call_now: false,
}
}