mirror of
				https://gitlab.com/comunic/comunicapiv3
				synced 2025-11-04 01:24:04 +00:00 
			
		
		
		
	Can check whether a conversation is having a call or not
This commit is contained in:
		@@ -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),
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user