where: u.deactivated != true,
where: u.local == true,
where: not is_nil(u.nickname),
- where: fragment("? not like 'internal.%'", u.nickname),
- where: fragment("? not like '%/relay'", u.ap_id)
+ where: not u.invisible
)
user_count = Repo.aggregate(users_query, :count, :id)
test "it ignores internal users" do
_user = insert(:user, local: true)
_internal = insert(:user, local: true, nickname: nil)
- _internal = insert(:user, local: true, nickname: "internal.dude")
_internal = Pleroma.Web.ActivityPub.Relay.get_actor()
assert match?(%{stats: %{user_count: 1}}, Pleroma.Stats.calculate_stat_data())