mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Add topic_diff to PostRevisor (#12518)
The instance of the PostRevisor is passed to the post_edited event. It is useful to know what has happened to the topic in this event (we already pass a boolean for topic_changed? but that is not so helpful by itself).
This commit is contained in:
@@ -536,6 +536,10 @@ class PostRevisor
|
||||
@post.previous_changes.slice(*POST_TRACKED_FIELDS)
|
||||
end
|
||||
|
||||
def topic_diff
|
||||
@topic_changes.diff
|
||||
end
|
||||
|
||||
def perform_edit
|
||||
return if bypass_rate_limiter?
|
||||
EditRateLimiter.new(@editor).performed!
|
||||
|
||||
Reference in New Issue
Block a user