1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-03 23:29:33 +00:00

support of protect_content

This commit is contained in:
2022-01-01 20:13:22 +06:00
parent 148791ad68
commit 5c6a430f38
59 changed files with 521 additions and 152 deletions

View File

@@ -29,29 +29,35 @@ val SentMediaGroupUpdate.mediaGroupId: MediaGroupIdentifier
fun List<CommonMessage<MediaGroupContent>>.createResend(
chatId: ChatId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyTo: MessageIdentifier? = null
) = SendMediaGroup<MediaGroupContent>(
chatId,
map { it.content.toMediaGroupMemberInputMedia() },
disableNotification,
protectContent,
replyTo
)
fun List<CommonMessage<MediaGroupContent>>.createResend(
chat: Chat,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyTo: MessageIdentifier? = null
) = createResend(
chat.id,
disableNotification,
protectContent,
replyTo
)
fun SentMediaGroupUpdate.createResend(
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyTo: MessageIdentifier? = null
) = data.createResend(
chat,
disableNotification,
protectContent,
replyTo
)