mirror of
https://github.com/friendica/friendica
synced 2024-12-22 16:40:16 +00:00
Merge pull request #12838 from HankG/blocks-status-fix
Correctly reflect blocked status in Mastodon Relationship Object
This commit is contained in:
commit
1cff849a94
1 changed files with 8 additions and 8 deletions
|
@ -38,14 +38,14 @@ class Relationship extends BaseFactory
|
|||
public function createFromContactId(int $contactId, int $uid): RelationshipEntity
|
||||
{
|
||||
$cdata = Contact::getPublicAndUserContactID($contactId, $uid);
|
||||
if (!empty($cdata)) {
|
||||
$cid = $cdata['user'];
|
||||
$pcid = $cdata['public'];
|
||||
} else {
|
||||
$pcid = $cid = $contactId;
|
||||
}
|
||||
$pcid = !empty($cdata['public']) ? $cdata['public'] : $contactId;
|
||||
$cid = !empty($cdata['user']) ? $cdata['user'] : $contactId;
|
||||
|
||||
return new RelationshipEntity($pcid, Contact::getById($cid),
|
||||
Contact\User::isBlocked($cid, $uid), Contact\User::isIgnored($cid, $uid));
|
||||
return new RelationshipEntity(
|
||||
$pcid,
|
||||
Contact::getById($cid),
|
||||
Contact\User::isBlocked($cid, $uid),
|
||||
Contact\User::isIgnored($cid, $uid)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue