mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 20:45:35 +08:00
DEV: create new_post_moved event trigger when moving posts (#24005)
This change adds a new event trigger (new_post_moved) when the first post in a topic is moved to a new topic. Plugins that listen for the new_post_moved event now have an easy way to update old data based on the post id.
This commit is contained in:
@ -277,6 +277,7 @@ class PostMover
|
||||
new_post.custom_fields = post.custom_fields
|
||||
new_post.save_custom_fields
|
||||
|
||||
DiscourseEvent.trigger(:first_post_moved, new_post, post)
|
||||
DiscourseEvent.trigger(:post_moved, new_post, original_topic.id)
|
||||
|
||||
# we don't want to keep the old topic's OP bookmarked when we are
|
||||
|
Reference in New Issue
Block a user