DEV: use 'user_created' discourse event instead of 'after_commit' model callback.
This commit is contained in:
parent
8ccd286721
commit
5a919c2211
|
@ -120,9 +120,9 @@ after_initialize do
|
|||
DiscourseNarrativeBot::Store.remove(self.id)
|
||||
end
|
||||
|
||||
self.add_model_callback(User, :after_commit, on: :create) do
|
||||
if SiteSetting.discourse_narrative_bot_welcome_post_delay == 0 && !self.staged
|
||||
self.enqueue_bot_welcome_post
|
||||
self.on(:user_created) do |user|
|
||||
if SiteSetting.discourse_narrative_bot_welcome_post_delay == 0 && !user.staged
|
||||
user.enqueue_bot_welcome_post
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue