From 2b49a75a42ea1afb6b06d4ae4e6260916e28d074 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 20 Nov 2022 13:21:20 +0600 Subject: [PATCH] UserId = ChatId --- CHANGELOG.md | 1 + .../commonMain/kotlin/dev/inmo/tgbotapi/types/ChatIdentifier.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fc62c8f6d..b346bcb14f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * `Core`: * `ContentMessage`, `CommonMessage`, `PossiblyMediaGroupMessage` and `PossiblySentViaBotCommonMessage` got `out` variance + * `UserId` now is `ChatId` instead of `IdChatIdentififer` ## 4.1.2 diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ChatIdentifier.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ChatIdentifier.kt index 0f81141a77..a3aea3d94c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ChatIdentifier.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ChatIdentifier.kt @@ -69,7 +69,7 @@ val UserId.userLink: String val User.link: String get() = id.userLink -typealias UserId = IdChatIdentifier +typealias UserId = ChatId fun Identifier.toChatId(): IdChatIdentifier = ChatId(this) fun Int.toChatId(): IdChatIdentifier = toLong().toChatId()