Replace attachment links in the body

This commit is contained in:
Michael 2021-06-28 04:53:20 +00:00
parent dbf9132ea6
commit 7e200174d6
2 changed files with 48 additions and 21 deletions

View file

@ -173,8 +173,8 @@ class Photo extends BaseModule
return MPhoto::createPhotoForExternalResource($url);
case "media":
$media = DBA::selectFirst('post-media', ['url'], ['id' => $uid, 'type' => Post\Media::IMAGE]);
if (empty($media['url'])) {
$media = DBA::selectFirst('post-media', ['url', 'uri-id'], ['id' => $uid, 'type' => Post\Media::IMAGE]);
if (empty($media)) {
return false;
}