]> git.mxchange.org Git - friendica.git/commitdiff
Fix fatal errors / added some API todo
authorMichael <heluecht@pirati.ca>
Mon, 17 May 2021 19:20:31 +0000 (19:20 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 17 May 2021 19:20:31 +0000 (19:20 +0000)
doc/API-Mastodon.md
src/Model/Item.php
src/Protocol/DFRN.php

index 480e81cc484f269cc576294599f879db730ec657..3f21d823a480c0b82e830231c49270bdd71bf3ea 100644 (file)
@@ -122,6 +122,7 @@ These emdpoints are planned to be implemented
 - [`POST /api/v1/conversations/:id/read`](https://docs.joinmastodon.org/methods/timelines/conversations/)
 - [`GET /api/v1/instance/activity`](https://docs.joinmastodon.org/methods/instance#weekly-activity)
 - [`GET /api/v1/timelines/direct`](https://docs.joinmastodon.org/methods/timelines/)
+- [`GET /api/v2/search`](https://docs.joinmastodon.org/methods/search/)
 
 ## Non supportable endpoints
 
index d937430c39a5762014260d897c3a0f9dab195e0e..e8044ecd7a93b7b469952118194167b62f675851 100644 (file)
@@ -2707,7 +2707,7 @@ class Item
                        $shared_links = [];
                }
 
-               $attachments = Post\Media::splitAttachments($item['uri-id'], $item['guid'], $shared_links);
+               $attachments = Post\Media::splitAttachments($item['uri-id'], $item['guid'] ?? '', $shared_links);
                $s = self::addVisualAttachments($attachments, $item, $s, false);
                $s = self::addLinkAttachment($attachments, $body, $s, false, $shared_links);
                $s = self::addNonVisualAttachments($attachments, $item, $s, false);
index 2cb83627ace2a4ba5d5ff830e375456cf486f229..194fa43fdd4fc51ac537566ba1aa55d45789bfb3 100644 (file)
@@ -899,7 +899,7 @@ class DFRN
                        $entry->setAttribute("xmlns:statusnet", ActivityNamespace::STATUSNET);
                }
 
-               $body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
+               $body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body'] ?? '');
 
                if ($item['private'] == Item::PRIVATE) {
                        $body = Item::fixPrivatePhotos($body, $owner['uid'], $item, $cid);