Merge pull request #12125 from annando/pending
Don't show following/followed_by on pending
This commit is contained in:
commit
e582cd4543
1 changed files with 2 additions and 2 deletions
|
@ -94,9 +94,9 @@ class Relationship extends BaseDataTransferObject
|
||||||
$this->note = '';
|
$this->note = '';
|
||||||
|
|
||||||
if ($contactRecord['uid'] != 0) {
|
if ($contactRecord['uid'] != 0) {
|
||||||
$this->following = in_array($contactRecord['rel'] ?? 0, [Contact::SHARING, Contact::FRIEND]);
|
$this->following = !$contactRecord['pending'] && in_array($contactRecord['rel'] ?? 0, [Contact::SHARING, Contact::FRIEND]);
|
||||||
$this->requested = (bool)($contactRecord['pending'] ?? false);
|
$this->requested = (bool)($contactRecord['pending'] ?? false);
|
||||||
$this->followed_by = in_array($contactRecord['rel'] ?? 0, [Contact::FOLLOWER, Contact::FRIEND]);
|
$this->followed_by = !$contactRecord['pending'] && in_array($contactRecord['rel'] ?? 0, [Contact::FOLLOWER, Contact::FRIEND]);
|
||||||
$this->muting = (bool)($contactRecord['readonly'] ?? false) || $muted;
|
$this->muting = (bool)($contactRecord['readonly'] ?? false) || $muted;
|
||||||
$this->notifying = (bool)$contactRecord['notify_new_posts'] ?? false;
|
$this->notifying = (bool)$contactRecord['notify_new_posts'] ?? false;
|
||||||
$this->blocking = (bool)($contactRecord['blocked'] ?? false) || $blocked;
|
$this->blocking = (bool)($contactRecord['blocked'] ?? false) || $blocked;
|
||||||
|
|
Loading…
Reference in a new issue