diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php
index 44ef6e7f1..48fda6296 100644
--- a/src/Content/Text/BBCode.php
+++ b/src/Content/Text/BBCode.php
@@ -61,7 +61,8 @@ class BBCode
const BACKLINK = 8;
const ACTIVITYPUB = 9;
- const ANCHOR = '
';
+ const TOP_ANCHOR = '
';
+ const BOTTOM_ANCHOR = '
';
/**
* Fetches attachment data that were generated the old way
*
@@ -1089,7 +1090,7 @@ class BBCode
'$guid' => $attributes['guid'],
'$network_name' => ContactSelector::networkToName($network, $attributes['profile']),
'$network_icon' => ContactSelector::networkToIcon($network, $attributes['profile']),
- '$content' => self::setMentions(trim($content), 0, $network) . self::ANCHOR,
+ '$content' => self::TOP_ANCHOR . self::setMentions(trim($content), 0, $network) . self::BOTTOM_ANCHOR,
]);
break;
}
diff --git a/src/Model/Item.php b/src/Model/Item.php
index 3516a57bd..9fa657a69 100644
--- a/src/Model/Item.php
+++ b/src/Model/Item.php
@@ -2799,13 +2799,18 @@ class Item
'attachment' => $attachment,
],
]);
- $trailing .= $media;
+ // On Diaspora posts the attached pictures are leading
+ if ($item['network'] == Protocol::DIASPORA) {
+ $leading .= $media;
+ } else {
+ $trailing .= $media;
+ }
}
}
if ($shared) {
- $content = str_replace(BBCode::ANCHOR, '