use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
-use Friendica\Core\Renderer;
use Friendica\Core\Session;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Model\Item;
use Friendica\Model\Notify\Type;
use Friendica\Model\Photo;
+use Friendica\Model\Post;
use Friendica\Model\Tag;
use Friendica\Network\HTTPException;
use Friendica\Object\EMail\ItemCCEMail;
use Friendica\Protocol\Diaspora;
use Friendica\Util\DateTimeFormat;
use Friendica\Security\Security;
-use Friendica\Util\Strings;
use Friendica\Worker\Delivery;
function item_post(App $a) {
if (strlen($attachments)) {
$attachments .= ',';
}
- $attachments .= '[attach]href="' . DI::baseUrl() . '/attach/' . $attachment['id'] .
- '" length="' . $attachment['filesize'] . '" type="' . $attachment['filetype'] .
- '" title="' . ($attachment['filename'] ? $attachment['filename'] : '') . '"[/attach]';
+ $attachments .= Post\Media::getAttachElement(DI::baseUrl() . '/attach/' . $attachment['id'],
+ $attachment['filesize'], $attachment['filetype'], $attachment['filename'] ?? '');
}
$body = str_replace($match[1],'',$body);
}