1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-22 21:39:21 +00:00

Check if a user is a member of a call before giving him calls configuration

This commit is contained in:
Pierre HUBERT 2021-02-10 18:07:55 +01:00
parent 7a0f9620b2
commit 74b74fe76b

View File

@ -30,7 +30,10 @@ pub fn get_legacy_config(r: &mut HttpRequestHandler) -> RequestResult {
/// Get calls configuration /// Get calls configuration
pub fn get_config(r: &mut UserWsRequestHandler) -> RequestResult { pub fn get_config(r: &mut UserWsRequestHandler) -> RequestResult {
// TODO : check whether the user is the member of a call or not // Check whether the user is the member of a call or not
if let None = r.get_conn().active_call {
r.forbidden("You do not belong to any call yet!".to_string())?;
}
if let Some(conf) = conf().rtc_relay.as_ref() if let Some(conf) = conf().rtc_relay.as_ref()
{ {