ui: a password dialog for locked channels, and pokes with a message

Joining a locked channel sent no password, so the server refused it and
nothing said so; pokes always went out empty. Every join (a double-click
in the tree, joining a friend) now goes through App::join_channel: a
locked channel asks for its password first (join_password), which is
kept for the session until voice disconnects, and it is used when
connecting into the channel too. Event::JoinFailed asks again under
"Wrong password", or says the channel is full or why the server refused.
Without voice, a double-click connects into the channel, as joining a
friend did.

Connecting into a channel names it by id (`/<cid>`): by name the server
finds only a top-level channel, so a subchannel's name connected into
the default channel. A wrong password when connecting also puts us into
the default channel without a word, so the channel is joined again once
it shows in the presence (after_connect), and that move asks again.
Both seen on the dev TS3 and TS6 servers.

Poking opens a dialog with an optional message, its length counted up
to 100 characters; the UI trims and cuts it (poke_message), and the
engine cuts it on characters too. Both dev servers take 100 characters
of any width (400 bytes of emoji) and refuse 101 (seen through
ServerQuery). Dev switches channel-password[:wrong] and poke.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
Claude committed 2026-10-06 17:46:43 +00:00
1 parent 7e43178e04
commit 42639fd206
18 files changed
+512 -63

No files matched your search

+3
View File
@@ -61,6 +61,9 @@ pub(super) fn wire(ui: &MainWindow) {
bridge.on_member_action(|action| {
with_app(|app| app.member_action(&action));
});
bridge.on_send_poke(|text| {
with_app(|app| app.send_poke(&text));
});
bridge.on_member_volume(|percent| {
with_app(|app| app.member_volume(percent));
});
+6 -5
View File
@@ -25,13 +25,14 @@ pub(super) fn wire(ui: &MainWindow) {
});
bridge.on_join_channel(|cid| {
with_app(|app| {
app.command(|session| Command::MoveToChannel {
session,
channel: cid as ChannelId,
password: None,
})
if let Some(session) = app.current {
app.join_channel(session, cid as ChannelId);
}
});
});
bridge.on_join_with_password(|password| {
with_app(|app| app.join_with_password(password.to_string()));
});
bridge.on_toggle_collapse(|cid| {
with_app(|app| app.toggle_collapse(cid as ChannelId));
});