diff --git a/app/jobs/scheduled/pending_flags_reminder.rb b/app/jobs/scheduled/pending_flags_reminder.rb index 72e75372be2..94fb480ef17 100644 --- a/app/jobs/scheduled/pending_flags_reminder.rb +++ b/app/jobs/scheduled/pending_flags_reminder.rb @@ -13,7 +13,7 @@ module Jobs PostCreator.create( Discourse.system_user, - target_group_names: ["staff"], + target_group_names: Group[:staff].name, archetype: Archetype.private_message, subtype: TopicSubtype.system_message, title: I18n.t('flags_reminder.subject_template', { count: PostAction.flagged_posts_count }), diff --git a/app/models/post_action.rb b/app/models/post_action.rb index f149c29aee0..b1299e31176 100644 --- a/app/models/post_action.rb +++ b/app/models/post_action.rb @@ -227,7 +227,7 @@ SQL if [:notify_moderators, :spam].include?(post_action_type) opts[:subtype] = TopicSubtype.notify_moderators - opts[:target_group_names] = "moderators" + opts[:target_group_names] = Group[:moderators].name else opts[:subtype] = TopicSubtype.notify_user opts[:target_usernames] = if post_action_type == :notify_user