From aadf54e0df39aa2c1bce2c9df076c91ca7fd8167 Mon Sep 17 00:00:00 2001 From: eal Date: Mon, 20 Nov 2017 00:31:39 +0200 Subject: [PATCH] Don't show the user in their own following count. --- lib/pleroma/user.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index fbeeef003..dde51bd30 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -61,8 +61,9 @@ defmodule Pleroma.User do end def user_info(%User{} = user) do + oneself = if user.local, do: 1, else: 0 %{ - following_count: length(user.following), + following_count: length(user.following) - oneself, note_count: user.info["note_count"] || 0, follower_count: user.info["follower_count"] || 0 } -- 2.45.2