summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-01-03 10:37:02 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-01-03 10:37:02 -0100
commita1410b7ed83b9bc9c90ffb41d1d2e42577914595 (patch)
tree23aaa8d32ec5f4364bd1b8dc9a2bac65f42b04f8
parent3e8694ff530d28465d0afc7a7a4e43e0707ee604 (diff)
generate Id on Undo
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--lib/Service/FollowService.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Service/FollowService.php b/lib/Service/FollowService.php
index c305fa71..f6a2c45c 100644
--- a/lib/Service/FollowService.php
+++ b/lib/Service/FollowService.php
@@ -180,6 +180,7 @@ class FollowService {
* @throws RequestServerException
* @throws SocialAppConfigException
* @throws ItemUnknownException
+ * @throws UrlCloudException
*/
public function unfollowAccount(Person $actor, string $account) {
$remoteActor = $this->cacheActorService->getFromAccount($account);
@@ -188,8 +189,9 @@ class FollowService {
$follow = $this->followsRequest->getByPersons($actor->getId(), $remoteActor->getId());
$this->followsRequest->delete($follow);
- $undo = new Undo();
+ $undo = AP::$activityPub->getItemFromType(Undo::TYPE);
$follow->setParent($undo);
+ $undo->generateUniqueId('#undo/follows');
$undo->setObject($follow);
$undo->setActorId($actor->getId());