<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
$attachments = Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]);
if (!empty($attachments)) {
- $body .= "\n".DI::l10n()->t("Attachments:")."\n";
+ $body .= "\n[hr]\n";
foreach ($attachments as $attachment) {
$body .= "[" . $attachment['description'] . "](" . $attachment['url'] . ")\n";
}
$item['private'] = Item::PUBLIC;
}
+ // Don't trigger the addons
+ $item['api_source'] = false;
+
return Item::insert($item, true);
}
}