mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
Revert "pinned message in ExtendedOtherPartiesChat"
This reverts commit b7c3f9f607
.
This commit is contained in:
parent
b7c3f9f607
commit
f8182ddb85
@ -7,8 +7,6 @@
|
|||||||
* `Serialization`: `1.6.0` -> `1.6.1`
|
* `Serialization`: `1.6.0` -> `1.6.1`
|
||||||
* `Ktor`: `2.3.5` -> `2.3.6`
|
* `Ktor`: `2.3.5` -> `2.3.6`
|
||||||
* `MicroUtils`: `0.20.12` -> `0.20.15`
|
* `MicroUtils`: `0.20.12` -> `0.20.15`
|
||||||
* `Core`:
|
|
||||||
* New abstraction `ExtendedOtherPartiesChat` with `pinnedMessage`
|
|
||||||
|
|
||||||
## 9.3.0
|
## 9.3.0
|
||||||
|
|
||||||
|
@ -81,10 +81,7 @@ data class ExtendedPrivateChatImpl(
|
|||||||
@SerialName(emojiStatusCustomEmojiIdField)
|
@SerialName(emojiStatusCustomEmojiIdField)
|
||||||
override val statusEmojiId: CustomEmojiId? = null,
|
override val statusEmojiId: CustomEmojiId? = null,
|
||||||
@SerialName(emojiStatusExpirationDateField)
|
@SerialName(emojiStatusExpirationDateField)
|
||||||
override val statusEmojiExpiration: TelegramDate? = null,
|
override val statusEmojiExpiration: TelegramDate? = null
|
||||||
@SerialName(pinnedMessageField)
|
|
||||||
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
|
||||||
override val pinnedMessage: Message? = null,
|
|
||||||
) : ExtendedPrivateChat
|
) : ExtendedPrivateChat
|
||||||
|
|
||||||
typealias ExtendedUser = ExtendedPrivateChatImpl
|
typealias ExtendedUser = ExtendedPrivateChatImpl
|
||||||
|
@ -17,7 +17,7 @@ sealed interface ExtendedGroupChat : GroupChat, ExtendedPublicChat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer.Companion::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedPrivateChat : PrivateChat, ExtendedChatWithUsername, ExtendedOtherPartiesChat {
|
sealed interface ExtendedPrivateChat : PrivateChat, ExtendedChatWithUsername {
|
||||||
val bio: String
|
val bio: String
|
||||||
val hasPrivateForwards: Boolean
|
val hasPrivateForwards: Boolean
|
||||||
val hasRestrictedVoiceAndVideoMessages: Boolean
|
val hasRestrictedVoiceAndVideoMessages: Boolean
|
||||||
@ -28,9 +28,11 @@ sealed interface ExtendedPrivateChat : PrivateChat, ExtendedChatWithUsername, Ex
|
|||||||
get() = hasPrivateForwards
|
get() = hasPrivateForwards
|
||||||
}
|
}
|
||||||
|
|
||||||
sealed interface ExtendedPublicChat : ExtendedOtherPartiesChat, PublicChat {
|
sealed interface ExtendedPublicChat : ExtendedChat, PublicChat {
|
||||||
val description: String
|
val description: String
|
||||||
val inviteLink: String?
|
val inviteLink: String?
|
||||||
|
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
||||||
|
val pinnedMessage: Message?
|
||||||
val membersHidden: Boolean
|
val membersHidden: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,13 +68,6 @@ sealed interface ExtendedChat : Chat {
|
|||||||
val chatPhoto: ChatPhoto?
|
val chatPhoto: ChatPhoto?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer.Companion::class)
|
|
||||||
sealed interface ExtendedOtherPartiesChat : ExtendedChat {
|
|
||||||
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
|
||||||
val pinnedMessage: Message?
|
|
||||||
}
|
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer.Companion::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedChatWithUsername : UsernameChat, ExtendedChat {
|
sealed interface ExtendedChatWithUsername : UsernameChat, ExtendedChat {
|
||||||
val activeUsernames: List<Username>
|
val activeUsernames: List<Username>
|
||||||
|
@ -120,7 +120,6 @@ import dev.inmo.tgbotapi.types.chat.ExtendedChat
|
|||||||
import dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername
|
import dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername
|
||||||
import dev.inmo.tgbotapi.types.chat.ExtendedForumChat
|
import dev.inmo.tgbotapi.types.chat.ExtendedForumChat
|
||||||
import dev.inmo.tgbotapi.types.chat.ExtendedGroupChat
|
import dev.inmo.tgbotapi.types.chat.ExtendedGroupChat
|
||||||
import dev.inmo.tgbotapi.types.chat.ExtendedOtherPartiesChat
|
|
||||||
import dev.inmo.tgbotapi.types.chat.ExtendedPrivateChat
|
import dev.inmo.tgbotapi.types.chat.ExtendedPrivateChat
|
||||||
import dev.inmo.tgbotapi.types.chat.ExtendedPublicChat
|
import dev.inmo.tgbotapi.types.chat.ExtendedPublicChat
|
||||||
import dev.inmo.tgbotapi.types.chat.ExtendedSupergroupChat
|
import dev.inmo.tgbotapi.types.chat.ExtendedSupergroupChat
|
||||||
@ -1966,15 +1965,6 @@ public inline fun Chat.extendedChatOrThrow(): ExtendedChat = this as
|
|||||||
public inline fun <T> Chat.ifExtendedChat(block: (ExtendedChat) -> T): T? = extendedChatOrNull()
|
public inline fun <T> Chat.ifExtendedChat(block: (ExtendedChat) -> T): T? = extendedChatOrNull()
|
||||||
?.let(block)
|
?.let(block)
|
||||||
|
|
||||||
public inline fun Chat.extendedOtherPartiesChatOrNull(): ExtendedOtherPartiesChat? = this as?
|
|
||||||
dev.inmo.tgbotapi.types.chat.ExtendedOtherPartiesChat
|
|
||||||
|
|
||||||
public inline fun Chat.extendedOtherPartiesChatOrThrow(): ExtendedOtherPartiesChat = this as
|
|
||||||
dev.inmo.tgbotapi.types.chat.ExtendedOtherPartiesChat
|
|
||||||
|
|
||||||
public inline fun <T> Chat.ifExtendedOtherPartiesChat(block: (ExtendedOtherPartiesChat) -> T): T? =
|
|
||||||
extendedOtherPartiesChatOrNull() ?.let(block)
|
|
||||||
|
|
||||||
public inline fun Chat.extendedChatWithUsernameOrNull(): ExtendedChatWithUsername? = this as?
|
public inline fun Chat.extendedChatWithUsernameOrNull(): ExtendedChatWithUsername? = this as?
|
||||||
dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername
|
dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user