mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-23 18:11:40 +00:00
Check if a conversation can be the source for a call
This commit is contained in:
@ -5,6 +5,7 @@ import { UserHelper } from "../helpers/UserHelper";
|
||||
import { removeHTMLNodes } from "../utils/StringUtils";
|
||||
import { ConversationMessage } from "../entities/ConversationMessage";
|
||||
import { UnreadConversation } from "../entities/UnreadConversation";
|
||||
import { CallsHelper } from "../helpers/CallsHelper";
|
||||
|
||||
/**
|
||||
* Conversations controller
|
||||
@ -369,7 +370,8 @@ export class ConversationsController {
|
||||
name: c.name.length > 0 ? c.name : false,
|
||||
following: c.following ? 1 : 0,
|
||||
saw_last_message: c.sawLastMessage ? 1 : 0,
|
||||
members: [...c.members]
|
||||
members: [...c.members],
|
||||
can_have_call: CallsHelper.CanHaveCall(c)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,13 @@ export class RTCRelayController {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Check out wheter a relay is currently connected to the API
|
||||
*/
|
||||
public static get IsConnected() : boolean {
|
||||
return this.currWs && this.currWs.readyState == ws.OPEN;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called when a websocket connection is closed
|
||||
*/
|
||||
|
Reference in New Issue
Block a user