FEATURE: track statistics around post creation

- how long were people typing?
- how long was composer open?
- how many drafts were created?
- correct, draft saved to go away after you continue typing

store in Post.find(xyz).post_stat
This commit is contained in:
Sam
2015-08-03 14:29:04 +10:00
parent 5d40695908
commit 7b8b96446e
11 changed files with 148 additions and 12 deletions

View File

@ -403,7 +403,6 @@ class PostsController < ApplicationController
# Awful hack, but you can't seem to remove the `default_scope` when joining
# So instead I grab the topics separately
topic_ids = posts.dup.pluck(:topic_id)
secured_category_ids = guardian.secure_category_ids
topics = Topic.where(id: topic_ids).with_deleted.where.not(archetype: 'private_message')
topics = topics.secured(guardian)
@ -422,7 +421,9 @@ class PostsController < ApplicationController
:category,
:target_usernames,
:reply_to_post_number,
:auto_track
:auto_track,
:typing_duration_msecs,
:composer_open_duration_msecs
]
# param munging for WordPress