Add acting user to suspended users

This commit is contained in:
cocococosti 2024-02-19 17:37:55 -04:00
parent c1f078cacf
commit 7f9649b467
No known key found for this signature in database
GPG Key ID: FDEE4E9ED2BD9B89
1 changed files with 2 additions and 1 deletions

View File

@ -1506,11 +1506,12 @@ class BulkImport::Generic < BulkImport::Base
create_user_histories(user_histories) do |row|
user_id = user_id_from_imported_id(row["id"])
acting_user_id = user_id_from_imported_id(row["acting_user_id"])
next if user_id && existing_user_ids.include?(user_id)
{
action: action_id,
acting_user_id: Discourse::SYSTEM_USER_ID,
acting_user_id: acting_user_id || Discourse::SYSTEM_USER_ID,
target_user_id: user_id,
details: row["reason"],
}