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

This commit is contained in:
InsanusMokrassar committed 2022-11-11 12:59:42 +06:00
1 parent 03cd4276a9
commit e8991f8f89
2 files changed
+6

No files matched your search

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