-
Notifications
You must be signed in to change notification settings - Fork 5
Feature/message opt in #955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Robert Smith <[email protected]>
…olicy, people form, and en.yml conflicts keeping both message opt-in and conversation details toggles
…c; add request spec for participant list
…ors; add i18n; add model + request specs
…ipants for create/update; update request specs
…ing templates, improve participant filtering, and update localization for permitted participants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
## Summary - raise `ActiveRecord::RecordNotFound` when accessing conversations not belonging to the current user - add request spec to ensure non-participants receive a 404 response ## Testing - `bin/dc-run bundle exec rubocop` *(fails: docker: command not found)* - `bin/codex_style_guard` *(fails: bundler: command not found: rubocop)* - `bin/dc-run bundle exec brakeman --quiet --no-pager` *(fails: docker: command not found)* - `bin/dc-run bundle exec bundler-audit --update` *(fails: docker: command not found)* - `bin/dc-run bin/i18n` *(fails: docker: command not found)* - `bin/dc-run bin/ci` *(fails: docker: command not found)* ------ https://chatgpt.com/codex/tasks/task_e_68b1f69223b88321bb27a78b2da20f6d
This pull request introduces an opt-in mechanism for platform members to receive direct messages, tightening permissions around who can be added as participants in new or updated conversations. It centralizes participant permission logic, updates error handling and feedback, and adds localization for new messaging rules. The changes affect controller logic, model preferences, policy enforcement, user interface, and translations, ensuring members have explicit control over their messaging privacy.
Messaging Permissions & Participant Filtering:
receive_messages_from_memberspreference toBetterTogether::Person, defaulting to false, allowing members to opt in to receive messages from non-managers.ConversationPolicy#permitted_participants, restricting regular members to only message platform managers or opted-in members.ConversationsController#createand#updateto filter participant IDs using the new policy and provide error feedback if only disallowed participants are submitted. [1] [2] [3] [4]User Interface & Feedback:
Localization & Error Messaging:
Testing: