Unfollow will send a request to remote instance

pull/195/head
Maxence Lange 2018-12-10 09:52:46 -01:00 zatwierdzone przez Julius Härtl
rodzic 7a3d006dab
commit 713806a0af
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4C614C6ED2CDE6DF
1 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -170,6 +170,18 @@ class FollowService implements ICoreService {
try {
$follow = $this->followsRequest->getByPersons($actor->getId(), $remoteActor->getId());
$this->followsRequest->delete($follow);
$undo = new Undo();
$follow->setParent($undo);
$undo->setObject($follow);
$undo->setActorId($actor->getId());
$undo->addInstancePath(
new InstancePath(
$remoteActor->getInbox(), InstancePath::TYPE_INBOX, InstancePath::PRIORITY_TOP
)
);
$this->activityService->request($undo);
} catch (FollowDoesNotExistException $e) {
}
}