FIX: Narration Bot now gets site setting for automatic post deletion (#7432)

This commit is contained in:
Tim Lange 2019-04-25 01:29:20 +02:00 committed by Guo Xiang Tan
parent aadb7da7d3
commit d5d784b9f2
3 changed files with 3 additions and 3 deletions

View File

@ -366,7 +366,7 @@ en:
reply: |-
Phew, that was a close one! Thanks for fixing that :wink:
Do note that you only have 24 hours to undelete a post.
Do note that you only have %{deletion_after} hour(s) to undelete a post.
category_hashtag:
instructions: |-

View File

@ -249,7 +249,7 @@ module DiscourseNarrativeBot
fake_delay
raw = <<~RAW
#{I18n.t("#{I18N_KEY}.recover.reply", i18n_post_args)}
#{I18n.t("#{I18N_KEY}.recover.reply", i18n_post_args(deletion_after: SiteSetting.delete_removed_posts_after))}
#{instance_eval(&@next_instructions)}
RAW

View File

@ -390,7 +390,7 @@ RSpec.describe DiscourseNarrativeBot::AdvancedUserNarrative do
.to change { Post.count }.by(1)
expected_raw = <<~RAW
#{I18n.t('discourse_narrative_bot.advanced_user_narrative.recover.reply', base_uri: '')}
#{I18n.t('discourse_narrative_bot.advanced_user_narrative.recover.reply', base_uri: '', deletion_after: SiteSetting.delete_removed_posts_after)}
#{I18n.t('discourse_narrative_bot.advanced_user_narrative.category_hashtag.instructions', category: "#a:b", base_uri: '')}
RAW