forked from GNUsocial/gnu-social
Fix negative one subscriptions by XRevan86
Only local users are subscribed to themselves.
This commit is contained in:
parent
a4e679a118
commit
339204f1ee
@ -738,7 +738,10 @@ class Profile extends Managed_DataObject
|
||||
|
||||
$cnt = (int) $sub->count('distinct subscribed');
|
||||
|
||||
$cnt = ($cnt > 0) ? $cnt - 1 : $cnt;
|
||||
// Local users are subscribed to themselves
|
||||
if ($this->isLocal()) {
|
||||
$cnt = ($cnt > 0) ? $cnt - 1 : $cnt;
|
||||
}
|
||||
|
||||
if (!empty($c)) {
|
||||
$c->set(Cache::key('profile:subscription_count:'.$this->id), $cnt);
|
||||
|
Loading…
Reference in New Issue
Block a user