summaryrefslogtreecommitdiffstats
path: root/lib/Interfaces
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-01-26 10:57:07 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-01-26 10:57:07 -0100
commit823773fbbeca8740a510bf132b56838e32ecde35 (patch)
tree62dcb7dd99c4bb29ee2274bfe0f1ab8986bcc342 /lib/Interfaces
parent4b3e206ec15ba8885d2e72fefd8e4abb9a959554 (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.php25
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);
}