diff options
author | lain <lain@soykaf.club> | 2021-12-02 16:54:28 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2021-12-02 16:54:28 +0000 |
commit | 235c4139d701f7d25dac2a152d8ab6e4afb1c20d (patch) | |
tree | f16e0089c84728ef8b849bec6b34ca9721e004d9 /lib/pleroma/user.ex | |
parent | aaed93db27ea706bab772ea87b4d39e02906d547 (diff) | |
parent | efc28812b8de0d9a6c16d5af1380c6e9c3ef92b1 (diff) | |
download | pleroma-235c4139d701f7d25dac2a152d8ab6e4afb1c20d.tar.gz |
Merge branch 'fix/2782-nodeinfo-active-users' into 'develop'
nodeinfo: report activeMonth and activeHalfyear users fields
Closes #2782
See merge request pleroma/pleroma!3536
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r-- | lib/pleroma/user.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 3b4e49176..8e40dfc0d 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -2474,8 +2474,8 @@ defmodule Pleroma.User do |> update_and_set_cache() end - def active_user_count(weeks \\ 4) do - active_after = Timex.shift(NaiveDateTime.utc_now(), weeks: -weeks) + def active_user_count(days \\ 30) do + active_after = Timex.shift(NaiveDateTime.utc_now(), days: -days) __MODULE__ |> where([u], u.last_active_at >= ^active_after) |