Merge pull request #195 from nextcloud/unfollow-remote-user

Unfollow will send a request to remote instance
pull/246/head
Maxence Lange 2018-12-18 17:51:41 -01:00 zatwierdzone przez GitHub
commit aee68d4094
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
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) {
}
}