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 * The library uses the `media_quality` setting to use different defaults
* for recoding images sent with type DC_MSG_IMAGE. * for recoding images sent with type DC_MSG_IMAGE.
* If needed, recoding other file types is up to the UI. * If needed, recoding other file types is up to the UI.
* - `basic_webrtc_instance` = address to webrtc signaling server (https://github.com/cracker0dks/basicwebrtc) * - `webrtc_instance` = address to webrtc instance to use for videochats,
* that should be used for opening video hangouts. * eg. a server as of https://github.com/cracker0dks/basicwebrtc.
* This property is only used in the UIs not by the core itself. * Format: https://example.com/subdir#roomname=$ROOM
* 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.
* *
* If you want to retrieve a value, use dc_get_config(). * 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. * 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 * 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. * 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 chat_id
); );
let url = if let Some(basic_webrtc_instance) = let url = if let Some(webrtc_instance) = context.get_config(Config::WebrtcInstance).await {
context.get_config(Config::BasicWebrtcInstance).await webrtc_instance
{
basic_webrtc_instance
} else { } else {
bail!("basic_webrtc_instance not set"); bail!("webrtc_instance not set");
}; };
let room = dc_create_id(); let room = dc_create_id();

View File

@@ -123,12 +123,8 @@ pub enum Config {
/// because we do not want to send a second warning) /// because we do not want to send a second warning)
NotifyAboutWrongPw, NotifyAboutWrongPw,
/// address to webrtc signaling server (https://github.com/cracker0dks/basicwebrtc) /// address to webrtc instance to use for videochats
/// that should be used for opening video hangouts. WebrtcInstance,
/// 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,
} }
impl Context { impl Context {