FIX: post merging was failing silently (#12566)

https://meta.discourse.org/t/merging-very-long-posts-removes-them/183597
This commit is contained in:
Arpit Jalan
2021-04-01 06:46:18 +05:30
committed by GitHub
parent 28d67b4583
commit c478ffc662
6 changed files with 38 additions and 12 deletions

View File

@@ -363,6 +363,8 @@ class PostsController < ApplicationController
raise Discourse::InvalidParameters.new(:post_ids) if posts.pluck(:id) == params[:post_ids]
PostMerger.new(current_user, posts).merge
render body: nil
rescue PostMerger::CannotMergeError => e
render_json_error(e.message)
end
# Direct replies to this post