Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
aadf54e0
Commit
aadf54e0
authored
Nov 20, 2017
by
eal
Browse files
Don't show the user in their own following count.
parent
52aa65fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/user.ex
View file @
aadf54e0
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment