FIX: Don't start discobot poll tutorial if polls are disabled.

https://meta.discourse.org/t/discobot-dont-take-users-through-the-poll-tutorial-if-its-not-enabled/76604/3
This commit is contained in:
Guo Xiang Tan
2017-12-22 15:46:46 +08:00
parent 80eb492c07
commit d80aca0484
2 changed files with 24 additions and 0 deletions

View File

@ -80,6 +80,7 @@ module DiscourseNarrativeBot
},
tutorial_poll: {
prerequisite: Proc.new { SiteSetting.poll_enabled },
next_state: :tutorial_details,
next_instructions: Proc.new { I18n.t("#{I18N_KEY}.details.instructions", i18n_post_args) },
reply: {