mgmt: invite-flow polish — explain rejected non-direct invites via DM; stretch the greeting window for slow federated joins #101

Open
opened 2026-07-12 05:35:10 +00:00 by robocub · 0 comments
Collaborator

Two friction points from the first real-user night (2026-07-12), both survivors of the #97 fix:

  1. Silent decline of non-direct invites. A user who invites the bot to a REGULAR room ("New room" instead of "Start chat" — @qwertyad:qwertyad.one did exactly this) is correctly rejected (not_direct, the #71 DMs-only contract) but sees only a wordless decline — it reads as rude/broken. Now that #97 makes bot-initiated DMs survive the reaper, the reject path can create_dm(inviter) and explain: "I only work in direct messages — start a chat with me and send help." Rate-limit it (once per inviter per hour; reuse a stamp map) so a spammer can't farm outbound DMs. Also sharpen the wiki wording: Start chat, not create room.

  2. Greeting gives up too early on slow federated joins. greet_when_joined retries 1/3/10 s for the local room state to reach Joined; a slow federated join + sync lag exceeds that (room never reached joined state — skipping greeting, seen live at 04:19), leaving the new user in a silent room they assume is dead. Stretch to a capped backoff (~60 s total) — the greeting is the only signal the bot is alive.

Both are small, both in crates/matrix-rtc/src/mgmt.rs, both good candidates to ride the next mgmt release after alpha.25.

Two friction points from the first real-user night (2026-07-12), both survivors of the #97 fix: 1. **Silent decline of non-direct invites.** A user who invites the bot to a REGULAR room ("New room" instead of "Start chat" — `@qwertyad:qwertyad.one` did exactly this) is correctly rejected (`not_direct`, the #71 DMs-only contract) but sees only a wordless decline — it reads as rude/broken. Now that #97 makes bot-initiated DMs survive the reaper, the reject path can `create_dm(inviter)` and explain: "I only work in direct messages — start a chat with me and send `help`." Rate-limit it (once per inviter per hour; reuse a stamp map) so a spammer can't farm outbound DMs. Also sharpen the wiki wording: *Start chat*, not *create room*. 2. **Greeting gives up too early on slow federated joins.** `greet_when_joined` retries 1/3/10 s for the local room state to reach Joined; a slow federated join + sync lag exceeds that (`room never reached joined state — skipping greeting`, seen live at 04:19), leaving the new user in a silent room they assume is dead. Stretch to a capped backoff (~60 s total) — the greeting is the only signal the bot is alive. Both are small, both in `crates/matrix-rtc/src/mgmt.rs`, both good candidates to ride the next mgmt release after alpha.25.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dark/nether-voicebridge#101
No description provided.