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