Add opportunity to create "IdChatIdentifier" with optional "threadId"

This commit is contained in:
InsanusMokrassar 2022-11-11 12:59:42 +06:00
parent 03cd4276a9
commit e8991f8f89
2 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,9 @@
## 4.1.1
* `Core`:
* Add opportunity to create `IdChatIdentifier` with optional `threadId`
## 4.1.0
* `Versions`:

View File

@ -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)
}
}