Force removal from relay list

This commit is contained in:
Michael 2020-09-29 05:06:37 +00:00
parent 7252e0b37c
commit eff4d18209
4 changed files with 34 additions and 14 deletions

View file

@ -173,6 +173,17 @@ class Receiver
return;
}
$contact = Contact::getByURL($actor);
if (empty($contact)) {
Logger::info('Relay contact not found', ['actor' => $actor]);
return;
}
if (!in_array($contact['rel'], [Contact::SHARING, Contact::FRIEND])) {
Logger::notice('Relay is no sharer', ['actor' => $actor]);
return;
}
Logger::info('Got relayed message id', ['id' => $object_id]);
$item_id = Item::searchByLink($object_id);