Skip to content

Commit

Permalink
FEATURE: Hide non-human users, and respect hide_profile_and_presence
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq committed Oct 19, 2018
1 parent c62928e commit 6410590
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin.rb
Expand Up @@ -85,6 +85,11 @@ def on_request

# When user seen, update the redis data
on(:user_seen) do |user|
hidden = false
hidden ||= user.user_option.hide_profile_and_presence if defined? user.user_option.hide_profile_and_presence
hidden ||= user.id < 0
break if hidden

was_offline = ::DiscourseWhosOnline::OnlineManager.add(user.id)

if was_offline
Expand Down

0 comments on commit 6410590

Please sign in to comment.