Auto-join groups: /g and /gjoin auto-create if group doesn't exist

- Server: /join endpoint creates the group if it doesn't exist
- CLI TUI: /g <name> auto-joins before switching
- Web: /g <name> auto-joins before switching
- No more "group not found" errors — just /g ops and go

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-26 23:17:03 +04:00
parent f3e78c6cff
commit 5cf7e8a02f
3 changed files with 16 additions and 3 deletions

View File

@@ -204,6 +204,8 @@ impl App {
}
if text.starts_with("/g ") {
let name = text[3..].trim().to_string();
// Auto-join
self.group_join(&name, client).await;
self.add_message(ChatLine {
sender: "system".into(),
text: format!("Switched to group #{}", name),