Merge pull request #10286 from annando/local-contacts-tombstone
Don't delete local tombstone contacts
This commit is contained in:
commit
3c8a08840b
2 changed files with 9 additions and 2 deletions
|
@ -1941,6 +1941,11 @@ class Contact
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Contact::isLocal($ret['url'])) {
|
||||||
|
Logger::info('Local contacts are not updated here.');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($ret['account-type']) && $ret['account-type'] == User::ACCOUNT_TYPE_DELETED) {
|
if (!empty($ret['account-type']) && $ret['account-type'] == User::ACCOUNT_TYPE_DELETED) {
|
||||||
Logger::info('Deleted account', ['id' => $id, 'url' => $ret['url'], 'ret' => $ret]);
|
Logger::info('Deleted account', ['id' => $id, 'url' => $ret['url'], 'ret' => $ret]);
|
||||||
self::remove($id);
|
self::remove($id);
|
||||||
|
|
|
@ -558,8 +558,10 @@ class HTTPSignature
|
||||||
if (!empty($key['url']) && !empty($key['type']) && ($key['type'] == 'Tombstone')) {
|
if (!empty($key['url']) && !empty($key['type']) && ($key['type'] == 'Tombstone')) {
|
||||||
Logger::info('Actor is a tombstone', ['key' => $key]);
|
Logger::info('Actor is a tombstone', ['key' => $key]);
|
||||||
|
|
||||||
|
if (!Contact::isLocal($key['url'])) {
|
||||||
// We now delete everything that we possibly knew from this actor
|
// We now delete everything that we possibly knew from this actor
|
||||||
Contact::deleteContactByUrl($key['url']);
|
Contact::deleteContactByUrl($key['url']);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue