An account can say where its calls go

`setMatrixRtcFocus` worked and had nobody calling it, and the value it set
was never sent back to any client - so even a window that wanted to offer
the setting had nothing to show in the field.

`rtcFocusUrl` now travels with the account. Skipped when absent rather than
sent as null, because it is meaningless on the other four services and on
most Matrix accounts too: a homeserver that names its own media server
leaves this empty forever, which is the ordinary case.

Towards #200.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
2026-09-12 09:51:44 -04:00
co-authored by Claude Opus 5
parent 03e8bc84ef
commit e8cba7cae2
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -837,6 +837,7 @@ pub fn irc_account_to_json(a: &IrcAccountConfig, state: &str) -> Account {
tor_proxy: a.tor_proxy.clone(),
use_tor: a.use_tor,
has_key_backup: false,
rtc_focus_url: None,
}
}
@@ -869,6 +870,7 @@ pub fn discord_account_to_json(a: &DiscordAccountConfig, state: &str) -> Account
tor_proxy: None,
use_tor: false,
has_key_backup: false,
rtc_focus_url: None,
}
}
@@ -900,6 +902,7 @@ pub fn sneedchat_account_to_json(a: &SneedChatAccountConfig, state: &str) -> Acc
tor_proxy: a.proxy.clone(),
use_tor: false,
has_key_backup: false,
rtc_focus_url: None,
}
}
@@ -940,6 +943,7 @@ pub fn kick_account_to_json(a: &KickAccountConfig, state: &str) -> Account {
tor_proxy: None,
use_tor: false,
has_key_backup: false,
rtc_focus_url: None,
}
}
@@ -975,6 +979,7 @@ pub fn matrix_account_to_json(a: &MatrixAccountConfig, state: &str, has_key_back
tor_proxy: None,
use_tor: false,
has_key_backup,
rtc_focus_url: a.rtc_focus_url.clone(),
}
}
+5
View File
@@ -86,6 +86,11 @@ pub struct Account {
/// Always false for every other service.
#[serde(rename = "hasKeyBackup")]
pub has_key_backup: bool,
/// Matrix only: a media server for room calls, where the homeserver names
/// none of its own. Absent on every other service and on a Matrix account
/// that has not been given one.
#[serde(rename = "rtcFocusUrl", skip_serializing_if = "Option::is_none")]
pub rtc_focus_url: Option<String>,
}
/// One room in a Sneedchat account's currently-enabled list, as exposed on