DEV: Add plugin modifier to expand group mentions in post_alerter (#22163)
This commit is contained in:
parent
4b9d50c98a
commit
987d5b9fce
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue