Don't show the user in their own following count.
authoreal <eal@waifu.club>
Sun, 19 Nov 2017 22:31:39 +0000 (00:31 +0200)
committereal <eal@waifu.club>
Sun, 19 Nov 2017 22:31:39 +0000 (00:31 +0200)
lib/pleroma/user.ex

index fbeeef00327850de289988b2c70bc8898c193794..dde51bd3050deb440c40defbfec1c8ba41d43885 100644 (file)
@@ -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
     }