UX: Don't send emails for discobot notifications.

This commit is contained in:
Guo Xiang Tan
2017-06-12 16:41:39 +09:00
parent 41365f681c
commit e888369f51
13 changed files with 83 additions and 24 deletions

View File

@ -148,7 +148,6 @@ after_initialize do
SiteSetting.discourse_narrative_bot_enabled &&
self.id > 0 &&
!self.anonymous? &&
!self.user_option.mailing_list_mode &&
!self.staged &&
!SiteSetting.discourse_narrative_bot_ignored_usernames.split('|'.freeze).include?(self.username)
end