mirror of
https://github.com/friendica/friendica
synced 2025-04-28 02:30:16 +00:00
Avoid empty posts on Diaspora
This commit is contained in:
parent
3666742e7b
commit
c840ee82af
4 changed files with 13 additions and 9 deletions
|
@ -899,7 +899,7 @@ class DFRN
|
|||
$entry->setAttribute("xmlns:statusnet", ActivityNamespace::STATUSNET);
|
||||
}
|
||||
|
||||
$body = Post\Media::addAttachmentsToBody($item['uri-id']);
|
||||
$body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
||||
|
||||
if ($item['private'] == Item::PRIVATE) {
|
||||
$body = Item::fixPrivatePhotos($body, $owner['uid'], $item, $cid);
|
||||
|
|
|
@ -3406,7 +3406,7 @@ class Diaspora
|
|||
$type = "reshare";
|
||||
} else {
|
||||
$title = $item["title"];
|
||||
$body = Post\Media::addAttachmentsToBody($item['uri-id']);
|
||||
$body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
||||
|
||||
// Fetch the title from an attached link - if there is one
|
||||
if (empty($item["title"]) && DI::pConfig()->get($owner['uid'], 'system', 'attach_link_title')) {
|
||||
|
@ -3620,7 +3620,7 @@ class Diaspora
|
|||
$thread_parent_item = Post::selectFirst(['guid', 'author-id', 'author-link', 'gravity'], ['uri' => $item['thr-parent'], 'uid' => $item['uid']]);
|
||||
}
|
||||
|
||||
$body = Post\Media::addAttachmentsToBody($item['uri-id']);
|
||||
$body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
||||
|
||||
// The replied to autor mention is prepended for clarity if:
|
||||
// - Item replied isn't yours
|
||||
|
|
|
@ -1885,7 +1885,7 @@ class OStatus
|
|||
XML::addElement($doc, $entry, "id", $item["uri"]);
|
||||
XML::addElement($doc, $entry, "title", html_entity_decode($title, ENT_QUOTES, 'UTF-8'));
|
||||
|
||||
$body = Post\Media::addAttachmentsToBody($item['uri-id']);
|
||||
$body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
||||
$body = self::formatPicturePost($body);
|
||||
|
||||
if (!empty($item['title'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue