mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Pass in old post to post_moved DiscourseEvent (#30274)
This commit is contained in:
committed by
GitHub
parent
316ba67aac
commit
85773eee21
@@ -286,7 +286,7 @@ class PostMover
|
||||
end
|
||||
|
||||
DiscourseEvent.trigger(:first_post_moved, new_post, post)
|
||||
DiscourseEvent.trigger(:post_moved, new_post, original_topic.id)
|
||||
DiscourseEvent.trigger(:post_moved, new_post, original_topic.id, post)
|
||||
|
||||
# we don't want to keep the old topic's OP bookmarked when we are
|
||||
# moving it into a new topic
|
||||
@@ -323,7 +323,7 @@ class PostMover
|
||||
@post_ids_after_move.map { |post_id| post_id == post.id ? moved_post.id : post_id }
|
||||
end
|
||||
|
||||
DiscourseEvent.trigger(:post_moved, moved_post, original_topic.id)
|
||||
DiscourseEvent.trigger(:post_moved, moved_post, original_topic.id, post)
|
||||
|
||||
# Move any links from the post to the new topic
|
||||
moved_post.topic_links.update_all(topic_id: destination_topic.id)
|
||||
|
||||
Reference in New Issue
Block a user