Fix: "unsearchable" is now stored

This commit is contained in:
Michael 2024-03-15 06:07:47 +00:00
parent 57187f26ae
commit eaddf5318a
7 changed files with 25 additions and 6 deletions

View file

@ -376,6 +376,9 @@ class APContact
}
$apcontact['discoverable'] = JsonLD::fetchElement($compacted, 'toot:discoverable', '@value');
if (is_null($apcontact['discoverable']) && ($apcontact['type'] == 'Application')) {
$apcontact['discoverable'] = false;
}
if (!empty($apcontact['photo'])) {
$apcontact['photo'] = Network::addBasePath($apcontact['photo'], $apcontact['url']);

View file

@ -1130,7 +1130,7 @@ class Contact
{
// Always unarchive the relay contact entry
if (!empty($contact['batch']) && !empty($contact['term-date']) && ($contact['term-date'] > DBA::NULL_DATETIME)) {
$fields = ['failed' => false, 'term-date' => DBA::NULL_DATETIME, 'archive' => false];
$fields = ['failed' => false, 'term-date' => DBA::NULL_DATETIME, 'archive' => false, 'unsearchable' => true];
$condition = ['uid' => 0, 'network' => Protocol::FEDERATED, 'batch' => $contact['batch'], 'contact-type' => self::TYPE_RELAY];
if (!DBA::exists('contact', array_merge($condition, $fields))) {
self::update($fields, $condition);