Media Viewer: Fix action photos (#3130)

This commit is contained in:
Alexander Zinchuk 2023-05-02 15:23:14 +04:00
parent c9bf351eb8
commit 0a5cded695

View File

@ -133,8 +133,8 @@ export const useMediaProps = ({
if (message) { if (message) {
if (isDocumentPhoto || isDocumentVideo) { if (isDocumentPhoto || isDocumentVideo) {
return getMessageDocument(message)!.mediaSize!; return getMessageDocument(message)!.mediaSize!;
} else if (photo || webPagePhoto) { } else if (photo || webPagePhoto || actionPhoto) {
return getPhotoFullDimensions((photo || webPagePhoto)!)!; return getPhotoFullDimensions((photo || webPagePhoto || actionPhoto)!)!;
} else if (video || webPageVideo) { } else if (video || webPageVideo) {
return getVideoDimensions((video || webPageVideo)!)!; return getVideoDimensions((video || webPageVideo)!)!;
} }
@ -149,6 +149,7 @@ export const useMediaProps = ({
message, message,
photo, photo,
video, video,
actionPhoto,
webPagePhoto, webPagePhoto,
webPageVideo, webPageVideo,
]); ]);