diff --git a/plugins/discourse-narrative-bot/plugin.rb b/plugins/discourse-narrative-bot/plugin.rb index 54e97a05e7a..efa6ae8fead 100644 --- a/plugins/discourse-narrative-bot/plugin.rb +++ b/plugins/discourse-narrative-bot/plugin.rb @@ -257,7 +257,10 @@ after_initialize do args[:old_trust_level] == TrustLevel[1] if SiteSetting.discourse_narrative_bot_enabled && promoted_from_tl1 - Jobs.enqueue(:send_advanced_tutorial_message, user_id: args[:user_id]) + # NOTE: since the `user_promoted` event is triggered from inside a transaction + # we have to delay the job otherwise it might run before the transaction + # is commited and the user will be invisible to the job + Jobs.enqueue_in(1.minute, :send_advanced_tutorial_message, user_id: args[:user_id]) end end end diff --git a/plugins/discourse-narrative-bot/public/public b/plugins/discourse-narrative-bot/public/public new file mode 120000 index 00000000000..65954e2f81d --- /dev/null +++ b/plugins/discourse-narrative-bot/public/public @@ -0,0 +1 @@ +/home/regis/Poetry/discourse/plugins/discourse-narrative-bot/public \ No newline at end of file