Fix errors from #14578

This commit is contained in:
Art4 2024-12-09 22:26:24 +00:00
parent 97605498a6
commit 9867bdfcff
2 changed files with 23 additions and 24 deletions

View file

@ -174,27 +174,24 @@ class Actor
return $contact;
}
if (empty($contact)) {
$fields = [
'uid' => $contact_uid,
'network' => Protocol::BLUESKY,
'priority' => 1,
'writable' => true,
'blocked' => false,
'readonly' => false,
'pending' => false,
'url' => $did,
'nurl' => $did,
'alias' => ATProtocol::WEB . '/profile/' . $did,
'name' => $did,
'nick' => $did,
'addr' => $did,
'rel' => Contact::NOTHING,
];
$cid = Contact::insert($fields);
} else {
$cid = $contact['id'];
}
$fields = [
'uid' => $contact_uid,
'network' => Protocol::BLUESKY,
'priority' => 1,
'writable' => true,
'blocked' => false,
'readonly' => false,
'pending' => false,
'url' => $did,
'nurl' => $did,
'alias' => ATProtocol::WEB . '/profile/' . $did,
'name' => $did,
'nick' => $did,
'addr' => $did,
'rel' => Contact::NOTHING,
];
$cid = Contact::insert($fields);
$this->updateContactByDID($did);