]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/OStatus.php
Merge pull request #9476 from annando/media-attach
[friendica.git] / src / Protocol / OStatus.php
index 4b67d8ecb292a5790431ab15adef27b437ec1493..5c157c98052fc3fc9f176c689866e7fccacf5204 100644 (file)
@@ -36,6 +36,7 @@ use Friendica\Model\Contact;
 use Friendica\Model\Conversation;
 use Friendica\Model\Item;
 use Friendica\Model\ItemURI;
+use Friendica\Model\Post;
 use Friendica\Model\Tag;
 use Friendica\Model\User;
 use Friendica\Network\Probe;
@@ -1126,7 +1127,8 @@ class OStatus
                                                        if (!isset($attribute['length'])) {
                                                                $attribute['length'] = "0";
                                                        }
-                                                       $item["attach"] .= '[attach]href="'.$attribute['href'].'" length="'.$attribute['length'].'" type="'.$attribute['type'].'" title="'.($attribute['title'] ?? '') .'"[/attach]';
+                                                       $item["attach"] .= Post\Media::getAttachElement($attribute['href'],
+                                                               $attribute['length'], $attribute['type'], $attribute['title'] ?? '');
                                                }
                                                break;
                                        case "related":