Skip to content

feat(bot): ask for consent and linking when someone joins a recording channel - #203

Merged
TheMeinerLP merged 5 commits into
mainfrom
feat/consent-prompt-on-join
Nov 10, 2026
Merged

TheMeinerLP merged 5 commits into
mainfrom
feat/consent-prompt-on-join

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Implements the consent-prompt-on-join proposal (#202).

What changes for the team

Until now, someone who joined a recording channel without consent got no sign of it. The bot quietly left them out of the recording, and the only way in was to know about /consent grant and, separately, /link start. People found out afterwards that they were missing from the transcript.

Now the channel asks them. When a member joins a recording channel and is missing a step, the bot posts one message in the voice channel's text chat. The message mentions that member only and offers just the buttons that are still missing:

  • Consent opens a dialog with the explanation, the transcription host and the policy version, and a checkbox that must be ticked. Nothing is recorded unless the box is ticked. The grant takes the same path as /consent grant: the role first, then the append-only record.
  • Link account answers with a personal sign-in link that only the presser can see. The channel message never holds a URL, so nobody else can click it and bind their Outline account to someone else's Discord identity.

Each button acts for whoever presses it, not for the person mentioned. Once the mentioned member consents, the message turns into "@person consented" without pinging again.

When someone is asked

  • A person is pinged once per occupied channel. Leaving and rejoining while others are still there does not ping again, not even on a quick rejoin before the first message is out. Once the last person leaves, the record is cleared, so the next session asks again.
  • Consent is not asked again until the person revokes it or the policy version changes. There is no time-based expiry. Someone who consented weeks ago and has a linked account is never pinged.
  • The policy version and URL are read per server when the message is posted or a button is pressed, so a policy change applies at once.
  • The record lives in memory. A restart costs at most one repeated ping per person. Old messages keep working buttons, which answer "already recorded".

Permissions and failure

/setup now gives the bot's own role View Channel and Send Messages in every recording channel. Existing channels get this the next time /setup runs, so run it once after the rollout. If the bot cannot post, it logs a warning with server, channel and user id and carries on. The post runs off the voice handler, so recording for members who have consented never waits for it.

Logs carry ids and an outcome label only: never a URL, state token or consent text. A new counter, sturnus.consent_prompt.total, counts outcomes (posted, skipped_consented, skipped_already_pinged, no_permission, consented_via_prompt, link_started) with no person or channel labels.

What it deliberately does not do

  • No direct messages: they can be blocked or missed, and they do not show which recording is meant.
  • No new database table for the ping record.
  • No Linked Roles. That can come in a later change.

Checks

pytest -q 2683 passed (full suite, plus the regression test for the quick-rejoin double ping, 73 passed in the prompt suites) · ruff check · ruff format --check · mypy strict, 295 files

@TheMeinerLP
TheMeinerLP merged commit 46eacac into main Nov 10, 2026
10 checks passed
@TheMeinerLP
TheMeinerLP deleted the feat/consent-prompt-on-join branch November 10, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant