mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Avoid monkey patching which causes weird reloading error in dev.
This commit is contained in:
@@ -131,10 +131,7 @@ after_initialize do
|
||||
end
|
||||
end
|
||||
|
||||
require_dependency "user"
|
||||
|
||||
User.class_eval do
|
||||
def enqueue_narrative_bot_job?
|
||||
self.add_to_class(:user, :enqueue_narrative_bot_job?) do
|
||||
SiteSetting.discourse_narrative_bot_enabled &&
|
||||
self.id > 0 &&
|
||||
!self.anonymous? &&
|
||||
@@ -142,7 +139,6 @@ after_initialize do
|
||||
!self.staged &&
|
||||
!SiteSetting.discourse_narrative_bot_ignored_usernames.split('|'.freeze).include?(self.username)
|
||||
end
|
||||
end
|
||||
|
||||
self.on(:post_created) do |post, options|
|
||||
user = post.user
|
||||
|
||||
Reference in New Issue
Block a user