kopia lustrzana https://github.com/nextcloud/social
Unfollow will send a request to remote instance
rodzic
7a3d006dab
commit
713806a0af
|
|
@ -170,6 +170,18 @@ class FollowService implements ICoreService {
|
||||||
try {
|
try {
|
||||||
$follow = $this->followsRequest->getByPersons($actor->getId(), $remoteActor->getId());
|
$follow = $this->followsRequest->getByPersons($actor->getId(), $remoteActor->getId());
|
||||||
$this->followsRequest->delete($follow);
|
$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) {
|
} catch (FollowDoesNotExistException $e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue