Issue 10443: Fix requesting media content
This commit is contained in:
parent
5333ae4a3c
commit
ffdbac7e41
1 changed files with 1 additions and 7 deletions
|
@ -168,9 +168,6 @@ class Photo extends BaseModule
|
|||
return false;
|
||||
}
|
||||
|
||||
$author = Contact::selectFirst([], ["`id` IN (SELECT `author-id` FROM `post` WHERE `uri-id` = ?)", $media['uri-id']]);
|
||||
$url = Contact::magicLinkByContact($author, $url);
|
||||
|
||||
return MPhoto::createPhotoForExternalResource($url, (int)local_user());
|
||||
case "media":
|
||||
$media = DBA::selectFirst('post-media', ['url', 'uri-id'], ['id' => $uid, 'type' => Post\Media::IMAGE]);
|
||||
|
@ -178,10 +175,7 @@ class Photo extends BaseModule
|
|||
return false;
|
||||
}
|
||||
|
||||
$author = Contact::selectFirst([], ["`id` IN (SELECT `author-id` FROM `post` WHERE `uri-id` = ?)", $media['uri-id']]);
|
||||
$url = Contact::magicLinkByContact($author, $media['url']);
|
||||
|
||||
return MPhoto::createPhotoForExternalResource($url, (int)local_user());
|
||||
return MPhoto::createPhotoForExternalResource($media['url'], (int)local_user());
|
||||
case "contact":
|
||||
$contact = Contact::getById($uid, ['uid', 'url', 'avatar', 'photo', 'xmpp', 'addr']);
|
||||
if (empty($contact)) {
|
||||
|
|
Loading…
Reference in a new issue