webrtc-config-setting is just 'webrtc_instance'

This commit is contained in:
B. Petersen
2020-07-21 15:14:29 +02:00
parent e054a49198
commit f3b9f671ba
3 changed files with 9 additions and 17 deletions

View File

@@ -318,11 +318,9 @@ char* dc_get_blobdir (const dc_context_t* context);
* The library uses the `media_quality` setting to use different defaults
* for recoding images sent with type DC_MSG_IMAGE.
* If needed, recoding other file types is up to the UI.
* - `basic_webrtc_instance` = address to webrtc signaling server (https://github.com/cracker0dks/basicwebrtc)
* that should be used for opening video hangouts.
* This property is only used in the UIs not by the core itself.
* Format: https://example.com/subdir
* The other properties that are needed for a call such as the roomname will be set by the client in the anchor part of the url.
* - `webrtc_instance` = address to webrtc instance to use for videochats,
* eg. a server as of https://github.com/cracker0dks/basicwebrtc.
* Format: https://example.com/subdir#roomname=$ROOM
*
* If you want to retrieve a value, use dc_get_config().
*
@@ -842,7 +840,7 @@ uint32_t dc_send_text_msg (dc_context_t* context, uint32_t ch
/**
* Send invitation to a videochat.
*
* This function reads the `basic_webrtc_instance` config value,
* This function reads the `webrtc_instance` config value,
* may check that the server is working in some way
* and creates a unique room for this chat, if needed doing a TOKEN roundtrip for that.
*

View File

@@ -1619,12 +1619,10 @@ pub async fn send_videochat_invitation(context: &Context, chat_id: ChatId) -> Re
chat_id
);
let url = if let Some(basic_webrtc_instance) =
context.get_config(Config::BasicWebrtcInstance).await
{
basic_webrtc_instance
let url = if let Some(webrtc_instance) = context.get_config(Config::WebrtcInstance).await {
webrtc_instance
} else {
bail!("basic_webrtc_instance not set");
bail!("webrtc_instance not set");
};
let room = dc_create_id();

View File

@@ -123,12 +123,8 @@ pub enum Config {
/// because we do not want to send a second warning)
NotifyAboutWrongPw,
/// address to webrtc signaling server (https://github.com/cracker0dks/basicwebrtc)
/// that should be used for opening video hangouts.
/// This property is only used in the UIs not by the core itself.
/// Format: https://example.com/subdir
/// The other properties that are needed for a call such as the roomname will be set by the client in the anchor part of the url.
BasicWebrtcInstance,
/// address to webrtc instance to use for videochats
WebrtcInstance,
}
impl Context {