mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:16:08 +08:00
Corrected reply_to_user_id
to reference original posters ID instead of itself. (#25307)
This commit is contained in:
parent
610d5b45c7
commit
0c0f486647
|
@ -364,10 +364,10 @@ def update_posts
|
|||
|
||||
DB.exec <<~SQL
|
||||
UPDATE posts AS replies
|
||||
SET reply_to_user_id = replies.user_id
|
||||
FROM posts
|
||||
WHERE posts.topic_id = replies.topic_id
|
||||
AND posts.post_number = replies.reply_to_post_number
|
||||
SET reply_to_user_id = original.user_id
|
||||
FROM posts AS original
|
||||
WHERE original.topic_id = replies.topic_id
|
||||
AND original.post_number = replies.reply_to_post_number
|
||||
AND replies.reply_to_post_number IS NOT NULL
|
||||
AND replies.reply_to_user_id IS NULL
|
||||
AND replies.post_number <> replies.reply_to_post_number
|
||||
|
|
Loading…
Reference in New Issue
Block a user