Skip to content
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

Allow to prevent @all for non-moderators #9074

Closed
Tracked by #11899 ...
nickvergessen opened this issue Mar 16, 2023 · 8 comments · Fixed by #12618
Closed
Tracked by #11899 ...

Allow to prevent @all for non-moderators #9074

nickvergessen opened this issue Mar 16, 2023 · 8 comments · Fixed by #12618
Labels
1. to develop enhancement feature: api 🛠️ OCS API for conversations, chats and participants feature: frontend 🖌️ "Web UI" client feature: settings ⚙️ Settings and config related issues

Comments

@nickvergessen
Copy link
Member

nickvergessen commented Mar 16, 2023

Remaining task from #6339

@vitormattos
Copy link
Contributor

Will be necessary to add conversation level setting to prevent use @all in a conversation.

@vitormattos
Copy link
Contributor

vitormattos commented May 3, 2023

@nickvergessen could you check if the follow scenario is ok to cover this issue?

  Scenario: Toggle the usage of @all in a group by non moderators
    Given user "participant1" creates room "room" (v4)
      | roomType | 2 |
      | roomName | room |
    And user "participant1" sets setting "prevent_non_moderators_notify_all" to "1" with 200 (v1)
    And user "participant1" adds user "participant2" to room "room" with 200 (v4)
    And user "participant2" joins room "room" with 200 (v4)
    When user "participant2" sends message "Hi @all" to room "room" with 201
    Then user "participant1" has the following notifications
      | app | object_type | object_id | subject |
    When user "participant1" sets setting "prevent_non_moderators_notify_all" to "0" with 200 (v1)
    And user "participant2" sends message "Bye @all" to room "room" with 201
    Then user "participant1" has the following notifications
      | app    | object_type | object_id    | subject                                                          |
      | spreed | chat        | room/Bye @all | participant1-displayname mentioned everyone in conversation room |

@nickvergessen
Copy link
Member Author

prevent_nom_moderatos_… you mean _non_moderators_ ?

We might even want to reject the message instead of still posting it? Silently ignoring it doesn't sound like the best idea to me.
Also the @all should no longer be returned by the autocomplete suggestions

For the test you should use 2 different messages, maybe Hi @all and Bye @all to confirm which message is causing the notification at the end.

@vitormattos
Copy link
Contributor

Scenario fixed.

@vitormattos
Copy link
Contributor

@nickvergessen now is the mention scenario:

  Scenario: Toggle the usage of @all and try to use mentions
    Given user "participant1" creates room "room" (v4)
      | roomType | 2 |
      | roomName | room |
    And user "participant1" adds user "participant2" to room "room" with 200 (v4)
    And user "participant2" joins room "room" with 200 (v4)
    When user "participant1" sets setting "prevent_non_moderators_notify_all" to "1" with 200 (v1)
    Then user "participant2" gets the following candidate mentions in room "room" for "all" with 400
    When user "participant1" sets setting "prevent_non_moderators_notify_all" to "0" with 200 (v1)
    Then user "participant2" gets the following candidate mentions in room "room" for "all" with 200
      | id           | label                    | source |
      | all          | room                     | calls  |

@vitormattos
Copy link
Contributor

@nickvergessen is this app setting, right? Or is a setting by room?

@nickvergessen
Copy link
Member Author

per room

@vitormattos
Copy link
Contributor

I will change from prevent_non_moderators_notify_all to can_mention_everyone to have a short parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop enhancement feature: api 🛠️ OCS API for conversations, chats and participants feature: frontend 🖌️ "Web UI" client feature: settings ⚙️ Settings and config related issues
Projects
Status: ☑️ Done
Archived in project
2 participants