User: Ignore non-local users when setting 'last active at'

This commit is contained in:
Lain Soykaf 2023-12-16 20:32:13 +04:00
parent 3fbc80eb58
commit c212fc1dcf
1 changed files with 2 additions and 0 deletions

View File

@ -2681,6 +2681,8 @@ def update_last_active_at(%__MODULE__{local: true} = user) do
|> update_and_set_cache()
end
def update_last_active_at(user), do: user
def active_user_count(days \\ 30) do
active_after = Timex.shift(NaiveDateTime.utc_now(), days: -days)