Commit aadf54e0 authored by eal's avatar eal

Don't show the user in their own following count.

parent 52aa65fe
......@@ -61,8 +61,9 @@ def info_changeset(struct, params \\ %{}) 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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment