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

Can check whether a conversation is having a call or not

This commit is contained in:
2021-02-10 18:14:17 +01:00
parent 74b74fe76b
commit 5194a389af
2 changed files with 21 additions and 2 deletions

View File

@ -4,6 +4,7 @@
use serde::{Serialize, Serializer};
use crate::api_data::legacy_api_bool::LegacyBool;
use crate::controllers::calls_controller;
use crate::data::conversation::Conversation;
use crate::helpers::calls_helper;
@ -51,8 +52,7 @@ impl ConversationAPI {
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
has_call_now: false,
has_call_now: calls_controller::is_conversation_having_call(&conv.id),
}
}