FEATURE: Improve composer warnings for mentions (#18796)

* FEATURE: Show warning if group cannot be mentioned

A similar warning is displayed when the user cannot be mentioned because
they have not been invited to the topic.

* FEATURE: Resolve mentions for new topic

This commit improves several improvements and refactors
/u/is_local_username route to a better /composer/mentions route that
can handle new topics too.

* FEATURE: Show warning if only some are notified

Sometimes users are still notified even if the group that was mentioned
was not invited to the message. This happens because its members were
invited directly or are members of other groups that were invited.

* DEV: Refactor _warnCannotSeeMention
This commit is contained in:
Bianca Nenciu
2022-12-05 20:22:05 +02:00
committed by GitHub
parent b46a7b51f7
commit 93859037ef
16 changed files with 718 additions and 400 deletions

View File

@@ -393,6 +393,7 @@ Discourse::Application.routes.draw do
post "session/2fa/test-action" => "session#test_second_factor_restricted_route"
end
get "session/scopes" => "session#scopes"
get "composer/mentions" => "composer#mentions"
get "composer_messages" => "composer_messages#index"
get "composer_messages/user_not_seen_in_a_while" => "composer_messages#user_not_seen_in_a_while"
@@ -425,7 +426,6 @@ Discourse::Application.routes.draw do
collection do
get "check_username"
get "check_email"
get "is_local_username"
end
end