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

@@ -413,6 +413,8 @@ async function groupJoin(name) {
}
async function groupSwitch(name) {
// Auto-join
await groupJoin(name);
const resp = await fetch(SERVER + '/v1/groups/' + name);
const data = await resp.json();
if (data.error) { addSys('Error: ' + data.error); return; }