mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-14 04:13:47 +00:00
Add UserShared
/ ChatShared
types
This commit is contained in:
parent
f29996aac8
commit
6f4b5810e9
@ -524,3 +524,5 @@ const val temporaryRegistrationField = "temporary_registration"
|
||||
const val buttonTextField = "button_text"
|
||||
const val webAppField = "web_app"
|
||||
const val menuButtonField = "menu_button"
|
||||
|
||||
const val requestIdField = "request_id"
|
||||
|
@ -29,6 +29,8 @@ import dev.inmo.tgbotapi.types.passport.PassportData
|
||||
import dev.inmo.tgbotapi.types.payments.Invoice
|
||||
import dev.inmo.tgbotapi.types.payments.SuccessfulPayment
|
||||
import dev.inmo.tgbotapi.types.polls.Poll
|
||||
import dev.inmo.tgbotapi.types.shared.ChatShared
|
||||
import dev.inmo.tgbotapi.types.shared.UserShared
|
||||
import dev.inmo.tgbotapi.types.venue.Venue
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
@ -92,6 +94,8 @@ internal data class RawMessage(
|
||||
private val invoice: Invoice? = null,
|
||||
private val dice: Dice? = null,
|
||||
private val successful_payment: SuccessfulPayment? = null,
|
||||
private val user_shared: UserShared? = null,
|
||||
private val chat_shared: ChatShared? = null,
|
||||
|
||||
// Voice Chat Service Messages
|
||||
private val video_chat_scheduled: VideoChatScheduled? = null,
|
||||
|
@ -0,0 +1,16 @@
|
||||
package dev.inmo.tgbotapi.types.shared
|
||||
|
||||
import dev.inmo.tgbotapi.types.Identifier
|
||||
import dev.inmo.tgbotapi.types.chatIdField
|
||||
import dev.inmo.tgbotapi.types.requestIdField
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class ChatShared(
|
||||
@SerialName(requestIdField)
|
||||
val requestId: Identifier,
|
||||
|
||||
@SerialName(chatIdField)
|
||||
val chatId: Identifier,
|
||||
)
|
@ -0,0 +1,16 @@
|
||||
package dev.inmo.tgbotapi.types.shared
|
||||
|
||||
import dev.inmo.tgbotapi.types.Identifier
|
||||
import dev.inmo.tgbotapi.types.requestIdField
|
||||
import dev.inmo.tgbotapi.types.userIdField
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class UserShared(
|
||||
@SerialName(requestIdField)
|
||||
val requestId: Identifier,
|
||||
|
||||
@SerialName(userIdField)
|
||||
val userId: Identifier,
|
||||
)
|
Loading…
Reference in New Issue
Block a user