1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-03-03 17:32:23 +00:00

improve repostStory

This commit is contained in:
2026-02-18 22:55:38 +06:00
parent 10b796c88e
commit e6cb028a71

View File

@@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.stories
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.stories.RepostStory import dev.inmo.tgbotapi.requests.stories.RepostStory
import dev.inmo.tgbotapi.types.BusinessChatId
import dev.inmo.tgbotapi.types.IdChatIdentifier import dev.inmo.tgbotapi.types.IdChatIdentifier
import dev.inmo.tgbotapi.types.Seconds import dev.inmo.tgbotapi.types.Seconds
import dev.inmo.tgbotapi.types.StoryId import dev.inmo.tgbotapi.types.StoryId
@@ -25,3 +26,20 @@ public suspend fun TelegramBot.repostStory(
protectContent = protectContent protectContent = protectContent
) )
) )
public suspend fun TelegramBot.repostStory(
fromChatId: BusinessChatId,
storyId: StoryId,
activePeriod: Seconds,
postToChatPage: Boolean = false,
protectContent: Boolean = false,
): Story = execute(
RepostStory(
businessConnectionId = fromChatId.businessConnectionId,
fromChatId = fromChatId,
storyId = storyId,
activePeriod = activePeriod,
postToChatPage = postToChatPage,
protectContent = protectContent
)
)