mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:21:12 +08:00
FIX: Update post's raw from server response (#13414)
The client used to update the raw, but sometimes the server changed the raw text, which resulted in false edit conflicts.
This commit is contained in:
@ -247,7 +247,7 @@ class PostsController < ApplicationController
|
||||
return render_json_error(post) if post.errors.present?
|
||||
return render_json_error(topic) if topic.errors.present?
|
||||
|
||||
post_serializer = PostSerializer.new(post, scope: guardian, root: false)
|
||||
post_serializer = PostSerializer.new(post, scope: guardian, root: false, add_raw: true)
|
||||
post_serializer.draft_sequence = DraftSequence.current(current_user, topic.draft_key)
|
||||
link_counts = TopicLink.counts_for(guardian, topic, [post])
|
||||
post_serializer.single_post_link_counts = link_counts[post.id] if link_counts.present?
|
||||
|
Reference in New Issue
Block a user