mirror of
https://github.com/InsanusMokrassar/TelegramBotApiLibraries.git
synced 2026-07-03 16:45:14 +00:00
fix of recaching for live photos
This commit is contained in:
@@ -92,7 +92,7 @@ class DefaultMessageContentCache<K>(
|
|||||||
if (savedSimpleContent is MediaContent && !with(mediaFileActualityChecker) { bot.isActual(savedSimpleContent) }) {
|
if (savedSimpleContent is MediaContent && !with(mediaFileActualityChecker) { bot.isActual(savedSimpleContent) }) {
|
||||||
val savedFileContentAllocator = messagesFilesCache.get(k) ?: error("Unexpected absence of $k file for content ($simpleMessageContentCache)")
|
val savedFileContentAllocator = messagesFilesCache.get(k) ?: error("Unexpected absence of $k file for content ($simpleMessageContentCache)")
|
||||||
val newContent = bot.execute(
|
val newContent = bot.execute(
|
||||||
when (savedSimpleContent.asTelegramMedia()) {
|
when (val content = savedSimpleContent.asTelegramMedia()) {
|
||||||
is TelegramMediaAnimation -> SendAnimation(
|
is TelegramMediaAnimation -> SendAnimation(
|
||||||
filesRefreshingChatId,
|
filesRefreshingChatId,
|
||||||
savedFileContentAllocator,
|
savedFileContentAllocator,
|
||||||
@@ -118,9 +118,10 @@ class DefaultMessageContentCache<K>(
|
|||||||
savedFileContentAllocator,
|
savedFileContentAllocator,
|
||||||
disableNotification = true
|
disableNotification = true
|
||||||
)
|
)
|
||||||
is TelegramMediaLivePhoto -> SendPhoto(
|
is TelegramMediaLivePhoto -> SendLivePhoto(
|
||||||
filesRefreshingChatId,
|
chatId = filesRefreshingChatId,
|
||||||
savedFileContentAllocator,
|
livePhoto = content.file,
|
||||||
|
photo = content.photo,
|
||||||
disableNotification = true
|
disableNotification = true
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user