2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: Don't track user profile view when viewed by system user.

This commit is contained in:
Guo Xiang Tan 2016-08-23 16:25:31 +08:00
parent f19232646f
commit 17f0727b04
2 changed files with 6 additions and 0 deletions

View file

@ -7,6 +7,7 @@ class UserProfileView < ActiveRecord::Base
at ||= Time.zone.now
redis_key = "user-profile-view:#{user_profile_id}:#{at.to_date}"
if user_id
return if user_id < 1
redis_key << ":user-#{user_id}"
else
redis_key << ":ip-#{ip}"