Add missing Module\Photo route for post-media id with no customsize
This commit is contained in:
parent
5112dd06f2
commit
c84d4104e8
|
@ -98,8 +98,8 @@ class Photo extends BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
// Please refactor this for the love of everything that's good
|
// Please refactor this for the love of everything that's good
|
||||||
if (!empty($parameters['contact_id'])) {
|
if (!empty($parameters['id'])) {
|
||||||
$uid = $parameters['contact_id'];
|
$uid = $parameters['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$photo = self::getAvatar($uid, $parameters['type'], $customsize ?: Proxy::PIXEL_SMALL);
|
$photo = self::getAvatar($uid, $parameters['type'], $customsize ?: Proxy::PIXEL_SMALL);
|
||||||
|
|
|
@ -372,10 +372,11 @@ return [
|
||||||
|
|
||||||
'/photo' => [
|
'/photo' => [
|
||||||
'/{name}' => [Module\Photo::class, [R::GET]],
|
'/{name}' => [Module\Photo::class, [R::GET]],
|
||||||
|
'/{type}/{id:\d+}' => [Module\Photo::class, [R::GET]],
|
||||||
// User Id Fallback, to remove after version 2021.12
|
// User Id Fallback, to remove after version 2021.12
|
||||||
'/{type}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
|
||||||
'/{type}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
|
||||||
'/{type}/{customsize}/{contact_id:\d+}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{customsize}/{id:\d+}' => [Module\Photo::class, [R::GET]],
|
||||||
// User Id Fallback, to remove after version 2021.12
|
// User Id Fallback, to remove after version 2021.12
|
||||||
'/{type}/{customsize}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{customsize}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
|
||||||
'/{type}/{customsize}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{customsize}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user