From c064e946b2294ee7048774f4cecd6402a6ea67ca Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Fri, 5 Aug 2016 18:08:24 +0530 Subject: [PATCH] FIX: custom reason for flags were not showing for non-english locales --- app/jobs/scheduled/pending_flags_reminder.rb | 2 +- app/models/post_action.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/jobs/scheduled/pending_flags_reminder.rb b/app/jobs/scheduled/pending_flags_reminder.rb index 72e75372b..94fb480ef 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 f149c29ae..b1299e311 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