mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
replace all usernames which was as strings by Username class usage
This commit is contained in:
parent
0009d211bc
commit
f6581ff3be
@ -25,6 +25,7 @@ work with media groups lists
|
||||
* Fixes in `Username`
|
||||
* Now you can create username object using string which is not starting with `@`
|
||||
* Now `Username` correctly comparing with strings, which are not starting with `@`
|
||||
* Now most part of usernames in library have type `Username`
|
||||
|
||||
## 0.9.0
|
||||
|
||||
|
@ -17,7 +17,7 @@ data class User(
|
||||
val lastName: String? = null,
|
||||
@SerialName(usernameField)
|
||||
@Optional
|
||||
val username: String? = null,
|
||||
val username: Username? = null,
|
||||
@SerialName(languageCodeField)
|
||||
@Optional
|
||||
private val languageCode: String? = null
|
||||
|
@ -1,13 +1,12 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.chat
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatPhoto
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage
|
||||
|
||||
data class ChannelChat(
|
||||
override val id: ChatId,
|
||||
override val title: String? = null,
|
||||
val username: String? = null,
|
||||
val username: Username? = null,
|
||||
val description: String? = null,
|
||||
override val inviteLink: String? = null,
|
||||
override val chatPhoto: ChatPhoto? = null,
|
||||
|
@ -1,11 +1,10 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.chat
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatPhoto
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
|
||||
data class PrivateChat(
|
||||
override val id: ChatId,
|
||||
val username: String? = null,
|
||||
val username: Username? = null,
|
||||
val firstName: String? = null,
|
||||
val lastName: String? = null,
|
||||
override val chatPhoto: ChatPhoto? = null
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.chat
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatPhoto
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@ -10,7 +9,7 @@ data class RawChat(
|
||||
override val id: ChatId,
|
||||
private val type: String,
|
||||
@Optional private val title: String? = null,
|
||||
@Optional private val username: String? = null,
|
||||
@Optional private val username: Username? = null,
|
||||
@Optional private val first_name: String? = null,
|
||||
@Optional private val last_name: String? = null,
|
||||
@Optional private val all_members_are_administrators: Boolean? = null,
|
||||
|
@ -1,13 +1,12 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.chat
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatPhoto
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage
|
||||
|
||||
data class SupergroupChat(
|
||||
override val id: ChatId,
|
||||
override val title: String? = null,
|
||||
val username: String? = null,
|
||||
val username: Username? = null,
|
||||
val description: String? = null,
|
||||
override val allMembersAreAdmins: Boolean,
|
||||
override val inviteLink: String? = null,
|
||||
|
Loading…
Reference in New Issue
Block a user