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

feat(mentions): prevent mention @all for non moderators #12618

Conversation

sanskar-soni-9
Copy link
Contributor

@sanskar-soni-9 sanskar-soni-9 commented Jun 29, 2024

☑️ Resolves

🛠️ API Checklist

🚧 Tasks

  • Add tests
  • Add docs

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@sanskar-soni-9 sanskar-soni-9 changed the title Feat/prevent mention all for non moderators feat(mentions): prevent mention @all for non moderators Jun 29, 2024
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very excesive and complete pull request. Thanks a lot.
Had a quick look and most of it looks good, just some minor details.

Are you willing to also look into integration tests? Otherwise we can do that, no problem at all.

lib/Signaling/Listener.php Outdated Show resolved Hide resolved
lib/Chat/Parser/UserMention.php Outdated Show resolved Hide resolved
lib/Chat/SystemMessage/Listener.php Outdated Show resolved Hide resolved
lib/Chat/Notifier.php Outdated Show resolved Hide resolved
@nickvergessen nickvergessen added this to the 💙 Next Major (30) milestone Jun 29, 2024
@nickvergessen nickvergessen added 2. developing feature: chat 💬 Chat and system messages feature: api 🛠️ OCS API for conversations, chats and participants feature: frontend 🖌️ "Web UI" client labels Jun 29, 2024
@sanskar-soni-9
Copy link
Contributor Author

Thanks!

Are you willing to also look into integration tests? Otherwise we can do that, no problem at all.

Yeah I'm looking for complete pull request including tests and docs

@sanskar-soni-9 sanskar-soni-9 force-pushed the feat/prevent-mention-all-for-non-moderators branch from b2e15a0 to fb1e18c Compare June 29, 2024 10:32
@sanskar-soni-9 sanskar-soni-9 marked this pull request as draft June 30, 2024 08:39
lib/Chat/Notifier.php Outdated Show resolved Hide resolved
lib/Chat/Notifier.php Outdated Show resolved Hide resolved
lib/Chat/Notifier.php Outdated Show resolved Hide resolved
@sanskar-soni-9 sanskar-soni-9 force-pushed the feat/prevent-mention-all-for-non-moderators branch from fb1e18c to ec95041 Compare July 2, 2024 16:08
@sanskar-soni-9 sanskar-soni-9 force-pushed the feat/prevent-mention-all-for-non-moderators branch 2 times, most recently from 7ef581c to fca7fff Compare July 5, 2024 13:07
@sanskar-soni-9
Copy link
Contributor Author

I'm working on tests and docs, I will update it soon.

@sanskar-soni-9
Copy link
Contributor Author

if (str_starts_with('here', $search)) {
return true;
}

Hi @nickvergessen, is this still in use? with this we do receive mention object through mentions api call but it does not mark message as a mention and also doesn't notifies

@sanskar-soni-9 sanskar-soni-9 force-pushed the feat/prevent-mention-all-for-non-moderators branch 2 times, most recently from 93fed77 to 590417b Compare July 7, 2024 17:29
@nickvergessen
Copy link
Member

is this still in use? with this we do receive mention object through mentions api call but it does not mark message as a mention and also doesn't notifies

It only is on the suggestions, so when you type @here into the chat, it will suggest @all.
It does not do anything on send

@sanskar-soni-9

This comment was marked as resolved.

@sanskar-soni-9 sanskar-soni-9 force-pushed the feat/prevent-mention-all-for-non-moderators branch 2 times, most recently from eda1737 to ca119f9 Compare July 12, 2024 17:11

This comment was marked as resolved.

@sanskar-soni-9 sanskar-soni-9 force-pushed the feat/prevent-mention-all-for-non-moderators branch from ca119f9 to a81fcc7 Compare July 14, 2024 10:24
@sanskar-soni-9 sanskar-soni-9 marked this pull request as ready for review July 14, 2024 10:28
@sanskar-soni-9 sanskar-soni-9 marked this pull request as draft July 14, 2024 13:07
@sanskar-soni-9 sanskar-soni-9 force-pushed the feat/prevent-mention-all-for-non-moderators branch from a81fcc7 to 457a91e Compare July 14, 2024 13:26
@sanskar-soni-9 sanskar-soni-9 marked this pull request as ready for review July 14, 2024 13:29
@sanskar-soni-9

This comment was marked as resolved.

@nickvergessen

This comment was marked as resolved.

@nickvergessen
Copy link
Member

Frontend review and we are ready to go

Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine on the frontend side, just come nitpicks.

src/components/ConversationSettings/MentionsSettings.vue Outdated Show resolved Hide resolved
src/components/ConversationSettings/MentionsSettings.vue Outdated Show resolved Hide resolved
src/components/ConversationSettings/MentionsSettings.vue Outdated Show resolved Hide resolved
@sanskar-soni-9 sanskar-soni-9 force-pushed the feat/prevent-mention-all-for-non-moderators branch 3 times, most recently from 4b0c550 to c000277 Compare July 23, 2024 11:16
@sanskar-soni-9
Copy link
Contributor Author

sanskar-soni-9 commented Jul 23, 2024

@nickvergessen sorry, I didn't updated local repo and directly force pushed, I recovered the changes but it will require your confirmation 😬

@nickvergessen
Copy link
Member

I'll rebase to solve the conflict and regenerate openapi

@nickvergessen
Copy link
Member

I also invited you to our org, so you can send your branches to our org, so we can easier collaborate and CI works

sanskar-soni-9 and others added 4 commits July 23, 2024 13:37
Signed-off-by: Sanskar Soni <sanskarsoni300@gmail.com>
Signed-off-by: Sanskar Soni <sanskarsoni300@gmail.com>
Signed-off-by: Sanskar Soni <sanskarsoni300@gmail.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@sanskar-soni-9
Copy link
Contributor Author

I also invited you to our org, so you can send your branches to our org, so we can easier collaborate and CI works

ok, really thanks, joined the org 🚀
And sorry again for the extra work, I forgot that my local branch was not updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing feature: api 🛠️ OCS API for conversations, chats and participants feature: chat 💬 Chat and system messages feature: frontend 🖌️ "Web UI" client feedback-requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to prevent @all for non-moderators
4 participants