1
0
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:
madhead 2023-02-03 22:38:59 +01:00
parent f29996aac8
commit 6f4b5810e9
No known key found for this signature in database
GPG Key ID: ACED25F067D0F238
4 changed files with 38 additions and 0 deletions

View File

@ -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"

View File

@ -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,

View File

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

View File

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