From: eal Date: Sun, 19 Nov 2017 22:31:39 +0000 (+0200) Subject: Don't show the user in their own following count. X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=aadf54e0df39aa2c1bce2c9df076c91ca7fd8167;p=akkoma Don't show the user in their own following count. --- 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 }