DEV: Add plugin modifier to expand group mentions in post_alerter (#22163)

This commit is contained in:
Mark VanLandingham 2023-06-16 14:48:07 -05:00 committed by GitHub
parent 4b9d50c98a
commit 987d5b9fce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -151,8 +151,15 @@ class PostAlerter
expand_group_mentions(mentioned_groups, post) do |group, users| expand_group_mentions(mentioned_groups, post) do |group, users|
users = only_allowed_users(users, post) users = only_allowed_users(users, post)
to_notify =
DiscoursePluginRegistry.apply_modifier(
:expand_group_mention_users,
users - notified,
group,
)
notified += notified +=
notify_users(users - notified, :group_mentioned, post, mentioned_opts.merge(group: group)) notify_users(to_notify, :group_mentioned, post, mentioned_opts.merge(group: group))
end end
if mentioned_here if mentioned_here