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

make chats to support private forums

This commit is contained in:
2026-01-07 23:19:12 +06:00
parent 9713a668e2
commit cc5056b685
12 changed files with 373 additions and 22 deletions

View File

@@ -117,6 +117,17 @@ public suspend fun TelegramBot.getChat(
chat: PrivateChatImpl
): ExtendedPrivateChatImpl = getChat(chat.id) as ExtendedPrivateChatImpl
/**
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
* [ExtendedPrivateForumChatImpl] with unsafe operator "as"
*
* @throws ClassCastException
*/
@PreviewFeature
public suspend fun TelegramBot.getChat(
chat: PrivateForumChatImpl
): ExtendedPrivateForumChatImpl = getChat(chat.id) as ExtendedPrivateForumChatImpl
/**
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
* [ExtendedUser] with unsafe operator "as"