mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
Add opportunity to create "IdChatIdentifier" with optional "threadId"
This commit is contained in:
parent
03cd4276a9
commit
e8991f8f89
@ -2,6 +2,9 @@
|
||||
|
||||
## 4.1.1
|
||||
|
||||
* `Core`:
|
||||
* Add opportunity to create `IdChatIdentifier` with optional `threadId`
|
||||
|
||||
## 4.1.0
|
||||
|
||||
* `Versions`:
|
||||
|
@ -30,6 +30,9 @@ sealed interface IdChatIdentifier : ChatIdentifier {
|
||||
|
||||
companion object {
|
||||
operator fun invoke(chatId: Identifier) = ChatId(chatId)
|
||||
operator fun invoke(chatId: Identifier, threadId: MessageThreadId?) = threadId ?.let {
|
||||
ChatIdWithThreadId(chatId, threadId)
|
||||
} ?: ChatId(chatId)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user