diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-01-26 10:57:07 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-01-26 10:57:07 -0100 |
commit | 823773fbbeca8740a510bf132b56838e32ecde35 (patch) | |
tree | 62dcb7dd99c4bb29ee2274bfe0f1ab8986bcc342 /lib/Interfaces | |
parent | 4b3e206ec15ba8885d2e72fefd8e4abb9a959554 (diff) |
object returned in the stream
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Interfaces')
-rw-r--r-- | lib/Interfaces/Object/AnnounceInterface.php | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/Interfaces/Object/AnnounceInterface.php b/lib/Interfaces/Object/AnnounceInterface.php index 829452d1..a7a49910 100644 --- a/lib/Interfaces/Object/AnnounceInterface.php +++ b/lib/Interfaces/Object/AnnounceInterface.php @@ -98,17 +98,7 @@ class AnnounceInterface implements IActivityPubInterface { /** @var Stream $item */ $item->checkOrigin($item->getId()); - try { - $this->notesRequest->getNoteById($item->getId()); - } catch (NoteNotFoundException $e) { - $objectId = $item->getObjectId(); - $item->addCacheItem($objectId); - $this->notesRequest->save($item); - - $this->streamQueueService->generateStreamQueue( - $item->getRequestToken(), StreamQueue::TYPE_CACHE, $item->getId() - ); - } + $this->save($item); } @@ -134,7 +124,17 @@ class AnnounceInterface implements IActivityPubInterface { */ public function save(ACore $item) { /** @var Announce $item */ -// $this->cacheDocumentsRequest->save($item); + try { + $this->notesRequest->getNoteById($item->getId()); + } catch (NoteNotFoundException $e) { + $objectId = $item->getObjectId(); + $item->addCacheItem($objectId); + $this->notesRequest->save($item); + + $this->streamQueueService->generateStreamQueue( + $item->getRequestToken(), StreamQueue::TYPE_CACHE, $item->getId() + ); + } } @@ -142,7 +142,6 @@ class AnnounceInterface implements IActivityPubInterface { * @param ACore $item */ public function delete(ACore $item) { -// $this->cacheDocumentsRequest->delete($item); } |