FIX: Merging users failed when PM was sent to source and target user

This commit is contained in:
Gerhard Schlager
2018-04-24 11:55:39 +02:00
committed by Robin Ward
parent c11e8c9a64
commit ec29869350
2 changed files with 46 additions and 2 deletions

View File

@@ -355,7 +355,7 @@ class UserMerger
conditions: ["x.action_type = y.action_type",
"x.target_topic_id IS NOT DISTINCT FROM y.target_topic_id",
"x.target_post_id IS NOT DISTINCT FROM y.target_post_id",
"x.acting_user_id IN (:source_user_id, :target_user_id)"])
"(x.acting_user_id IN (:source_user_id, :target_user_id) OR x.acting_user_id IS NOT DISTINCT FROM y.acting_user_id)"])
update_user_id(:user_actions,
user_id_column_name: "acting_user_id",
conditions: ["x.action_type = y.action_type",