FIX: whisper no longer experimental

- Regular users are not notified of whispers
- Regular users no longer have "stuck" topics in unread
- Additional tracking for staff highest post number
- Remove a bunch of unused columns in topics table
This commit is contained in:
Sam
2016-12-02 17:03:31 +11:00
parent 3f3a0d7b14
commit c04d4171ff
21 changed files with 324 additions and 103 deletions

View File

@@ -146,6 +146,9 @@ class PostCreator
end
if @post && errors.blank?
# update counters etc.
@post.topic.reload
publish
track_latest_on_category
@@ -199,7 +202,9 @@ class PostCreator
set_reply_info(post)
post.word_count = post.raw.scan(/[[:word:]]+/).size
post.post_number ||= Topic.next_post_number(post.topic_id, post.reply_to_post_number.present?)
whisper = post.post_type == Post.types[:whisper]
post.post_number ||= Topic.next_post_number(post.topic_id, post.reply_to_post_number.present?, whisper)
cooking_options = post.cooking_options || {}
cooking_options[:topic_id] = post.topic_id