diff options
author | kaniini <ariadne@dereferenced.org> | 2019-11-27 16:46:41 +0000 |
---|---|---|
committer | kaniini <ariadne@dereferenced.org> | 2019-11-27 16:46:41 +0000 |
commit | cb656938ca85f44efc6d5a4d4c21050de0fca9f5 (patch) | |
tree | 352863032ff2c6d6ba0e80756e6fe6814e0850df /lib | |
parent | ef1718a045065ec800dbd2b60879a28eb82caad8 (diff) | |
parent | 50b152766f3be98bda3c630c3e451e6411053900 (diff) | |
download | pleroma-cb656938ca85f44efc6d5a4d4c21050de0fca9f5.tar.gz |
Merge branch 'bugfix/1442-dont-return-nil-for-following-count' into 'develop'
User: Never return nil for user follower counts.
Closes #1442
See merge request pleroma/pleroma!2017
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/account_view.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex index 7f50f3aa6..1068f8823 100644 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -74,14 +74,14 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do following_count = if !user.hide_follows_count or !user.hide_follows or opts[:for] == user do - user.following_count + user.following_count || 0 else 0 end followers_count = if !user.hide_followers_count or !user.hide_followers or opts[:for] == user do - user.follower_count + user.follower_count || 0 else 0 end |