Repository navigation
feat(bot): ask for consent and linking when someone joins a recording channel - #203
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the
consent-prompt-on-joinproposal (#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 grantand, 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 grant: the role first, then the append-only record.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
Permissions and failure
/setupnow gives the bot's own role View Channel and Send Messages in every recording channel. Existing channels get this the next time/setupruns, 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
Checks
pytest -q2683 passed (full suite, plus the regression test for the quick-rejoin double ping, 73 passed in the prompt suites) ·ruff check·ruff format --check·mypystrict, 295 files