mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-26 15:29:21 +00:00
Check if a user is a member of a call before giving him calls configuration
This commit is contained in:
parent
7a0f9620b2
commit
74b74fe76b
@ -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()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user