generate Id on Undo

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/299/head
Maxence Lange 2019-01-03 10:37:02 -01:00
rodzic 3e8694ff53
commit a1410b7ed8
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -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());