FIX: Do not move hidden post actions. (#7424)

Hidden (staff-only) post actions are whisper posts with no content, that
are later transformed by the client into post actions (discourse-assign
uses this).
This commit is contained in:
Dan Ungureanu
2019-05-06 16:21:42 +03:00
committed by GitHub
parent d679c4e0eb
commit a40dcbde9b
2 changed files with 5 additions and 1 deletions

View File

@ -224,6 +224,7 @@ class PostMover
@posts ||= begin
Post.where(topic: @original_topic, id: post_ids)
.where.not(post_type: Post.types[:small_action])
.where.not(raw: '')
.order(:created_at).tap do |posts|
raise Discourse::InvalidParameters.new(:post_ids) if posts.empty?