This commit is contained in:
InsanusMokrassar 2022-09-04 16:11:54 +06:00
parent 96d3e52c5f
commit cf5a4c0f61

View File

@ -41,7 +41,7 @@ class PostPublisher(
return@forEach
}
val resultContents = contents.mapNotNull {
it.order to (bot.forwardMessage(cachingChatId, it.chatId, it.messageId).contentMessageOrNull() ?: return@mapNotNull null)
it.order to (bot.forwardMessage(toChatId = cachingChatId, fromChatId = it.chatId, messageId = it.messageId).contentMessageOrNull() ?: return@mapNotNull null)
}.sortedBy { it.first }.mapNotNull { (_, it) ->
it.withContentOrNull<MediaGroupContent>() ?: null.also { _ ->
bot.copyMessage(targetChatId, it)