Revert "FIX: Create post notices only for public posts (#8708)"

This reverts commit c2d051315d0e05d9d60e1ab163c2e941e29fccc2.
This commit is contained in:
Dan Ungureanu
2020-01-30 14:24:56 +02:00
parent 33abd68bdf
commit bf50087d72
2 changed files with 1 additions and 11 deletions

View File

@ -542,12 +542,8 @@ class PostCreator
def create_post_notice
return if @opts[:import_mode] || @user.anonymous? || @user.bot? || @user.staged
return if @post.topic.archetype != Archetype.default
last_post_time = Post
.joins("JOIN topics ON topics.id = posts.topic_id")
.where(user_id: @user.id)
.where(topics: { archetype: Archetype.default })
last_post_time = Post.where(user_id: @user.id)
.order(created_at: :desc)
.limit(1)
.pluck(:created_at)