FIX: custom reason for flags were not showing for non-english locales

This commit is contained in:
Arpit Jalan 2016-08-05 18:08:24 +05:30
parent d0962d6e5a
commit c064e946b2
2 changed files with 2 additions and 2 deletions

View file

@ -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 }),

View file

@ -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