X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fstats.ex;fp=lib%2Fpleroma%2Fstats.ex;h=cda1fb9a65ddb744ff9e0e705fc264b81ab4ea69;hb=b91e671c0d7cdca6b1ddf753f2017b15f366695f;hp=3e3f24c2c21cae836bd7831c5c4b59d04c7dff51;hpb=584f99b69dff93b4610c7e1042a9db5e89b1a31b;p=akkoma diff --git a/lib/pleroma/stats.ex b/lib/pleroma/stats.ex index 3e3f24c2c..cda1fb9a6 100644 --- a/lib/pleroma/stats.ex +++ b/lib/pleroma/stats.ex @@ -85,14 +85,24 @@ defmodule Pleroma.Stats do where: not u.invisible ) + remote_users_query = + from(u in User, + where: u.is_active == true, + where: u.local == false, + where: not is_nil(u.nickname), + where: not u.invisible + ) + user_count = Repo.aggregate(users_query, :count, :id) + remote_user_count = Repo.aggregate(remote_users_query, :count, :id) %{ peers: peers, stats: %{ domain_count: domain_count, status_count: status_count || 0, - user_count: user_count + user_count: user_count, + remote_user_count: remote_user_count } } end