diff --git a/lib/export/exporter.rb b/lib/export/exporter.rb index 74c41709c97..495ee6a5cba 100644 --- a/lib/export/exporter.rb +++ b/lib/export/exporter.rb @@ -268,9 +268,9 @@ module Export log "Notifying '#{@user.username}' of the end of the backup..." # NOTE: will only notify if @user != Discourse.site_contact_user if @success - SystemMessage.create(@user, :export_succeeded) + SystemMessage.create_from_system_user(@user, :export_succeeded) else - SystemMessage.create(@user, :export_failed, logs: @logs.join("\n")) + SystemMessage.create_from_system_user(@user, :export_failed, logs: @logs.join("\n")) end end diff --git a/lib/import/importer.rb b/lib/import/importer.rb index 78f3ab36712..ca62d6ce2a0 100644 --- a/lib/import/importer.rb +++ b/lib/import/importer.rb @@ -284,9 +284,9 @@ module Import log "Notifying '#{user.username}' of the end of the restore..." # NOTE: will only notify if user != Discourse.site_contact_user if @success - SystemMessage.create(user, :import_succeeded) + SystemMessage.create_from_system_user(user, :import_succeeded) else - SystemMessage.create(user, :import_failed, logs: @logs.join("\n")) + SystemMessage.create_from_system_user(user, :import_failed, logs: @logs.join("\n")) end else log "Could not send notification to '#{@user_info[:username]}' (#{@user_info[:email]}), because the user does not exists..."