1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-05-25 01:37:20 +00:00

fixes in guest mode

This commit is contained in:
2026-05-23 00:02:16 +06:00
parent eacf01a158
commit fdd21f3cbd
16 changed files with 777 additions and 535 deletions

View File

@@ -25118,6 +25118,54 @@ public final class dev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageI
public fun toString ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/message/AnswerGuestContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/AnswerGuestContentMessage {
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-APLFQys ()J
public final fun component10 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public final fun component11 ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
public final fun component12-CsYhHCU ()Ljava/lang/String;
public final fun component13 ()Ldev/inmo/tgbotapi/types/chat/User;
public final fun component14 ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public final fun component15 ()Z
public final fun component16 ()Ljava/lang/Integer;
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/User;
public final fun component3 ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public final fun component4 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent;
public final fun component5-Wg0KzQs ()D
public final fun component6-Ivn3T5g ()Lkorlibs/time/DateTime;
public final fun component7 ()Z
public final fun component8 ()Ldev/inmo/tgbotapi/types/message/MessageOrigin;
public final fun component9 ()Ldev/inmo/tgbotapi/types/ReplyInfo;
public final fun copy-FEh5XE4 (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/AnswerGuestContentMessageImpl;
public static synthetic fun copy-FEh5XE4$default (Ldev/inmo/tgbotapi/types/message/AnswerGuestContentMessageImpl;JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/AnswerGuestContentMessageImpl;
public fun equals (Ljava/lang/Object;)Z
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent;
public fun getCost ()Ljava/lang/Integer;
public fun getDate-Wg0KzQs ()D
public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime;
public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo;
public fun getForwardOrigin ()Ldev/inmo/tgbotapi/types/message/MessageOrigin;
public fun getForwardable ()Z
public fun getFrom ()Ldev/inmo/tgbotapi/types/chat/User;
public fun getFromOffline ()Z
public fun getGuestBotCallerChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public fun getGuestBotCallerUser ()Ldev/inmo/tgbotapi/types/chat/User;
public fun getHasProtectedContent ()Z
public fun getMediaGroupId-CsYhHCU ()Ljava/lang/String;
public fun getMessageId-APLFQys ()J
public fun getMetaInfo-fV8YnZ8 ()Lkotlin/Triple;
public fun getReplyInfo ()Ldev/inmo/tgbotapi/types/ReplyInfo;
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public fun getReplyTo ()Ldev/inmo/tgbotapi/types/message/abstracts/Message;
public fun getSenderBot ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
public fun getUser ()Ldev/inmo/tgbotapi/types/chat/User;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/message/BusinessContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage {
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/ForwardInfo;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewBot;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewBot;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
@@ -26789,57 +26837,6 @@ public final class dev/inmo/tgbotapi/types/message/FromChannelSuggestedChannelDi
public fun toString ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/message/GuestContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage {
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-APLFQys ()J
public final fun component10 ()Ldev/inmo/tgbotapi/types/ReplyInfo;
public final fun component11 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public final fun component12 ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
public final fun component13-CsYhHCU ()Ljava/lang/String;
public final fun component14 ()Ldev/inmo/tgbotapi/types/chat/User;
public final fun component15 ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public final fun component16 ()Z
public final fun component17 ()Ljava/lang/Integer;
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/User;
public final fun component3 ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public final fun component4-87nd9ik ()Ljava/lang/String;
public final fun component5 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent;
public final fun component6-Wg0KzQs ()D
public final fun component7-Ivn3T5g ()Lkorlibs/time/DateTime;
public final fun component8 ()Z
public final fun component9 ()Ldev/inmo/tgbotapi/types/message/MessageOrigin;
public final fun copy-sw4s1ag (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/GuestContentMessageImpl;
public static synthetic fun copy-sw4s1ag$default (Ldev/inmo/tgbotapi/types/message/GuestContentMessageImpl;JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/GuestContentMessageImpl;
public fun equals (Ljava/lang/Object;)Z
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent;
public fun getCost ()Ljava/lang/Integer;
public fun getDate-Wg0KzQs ()D
public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime;
public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo;
public fun getForwardOrigin ()Ldev/inmo/tgbotapi/types/message/MessageOrigin;
public fun getForwardable ()Z
public fun getFrom ()Ldev/inmo/tgbotapi/types/chat/User;
public fun getFromOffline ()Z
public fun getGuestBotCallerChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public fun getGuestBotCallerUser ()Ldev/inmo/tgbotapi/types/chat/User;
public fun getGuestQueryId-87nd9ik ()Ljava/lang/String;
public synthetic fun getGuestQueryId-BCLlPIY ()Ljava/lang/String;
public fun getHasProtectedContent ()Z
public fun getMediaGroupId-CsYhHCU ()Ljava/lang/String;
public fun getMessageId-APLFQys ()J
public fun getMetaInfo-fV8YnZ8 ()Lkotlin/Triple;
public fun getReplyInfo ()Ldev/inmo/tgbotapi/types/ReplyInfo;
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public fun getReplyTo ()Ldev/inmo/tgbotapi/types/message/abstracts/Message;
public fun getSenderBot ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
public fun getUser ()Ldev/inmo/tgbotapi/types/chat/User;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/message/HTMLParseMode : dev/inmo/tgbotapi/types/message/ParseMode {
public static final field INSTANCE Ldev/inmo/tgbotapi/types/message/HTMLParseMode;
public fun getParseModeName ()Ljava/lang/String;
@@ -27287,6 +27284,53 @@ public final class dev/inmo/tgbotapi/types/message/RawMessageEntityKt {
public static synthetic fun toRawMessageEntities$default (Ljava/util/List;IILjava/lang/Object;)Ljava/util/List;
}
public final class dev/inmo/tgbotapi/types/message/RequestGuestContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage {
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-APLFQys ()J
public final fun component10 ()Ldev/inmo/tgbotapi/types/ReplyInfo;
public final fun component11 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public final fun component12 ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
public final fun component13-CsYhHCU ()Ljava/lang/String;
public final fun component14 ()Z
public final fun component15 ()Ljava/lang/Integer;
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/User;
public final fun component3 ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public final fun component4-87nd9ik ()Ljava/lang/String;
public final fun component5 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent;
public final fun component6-Wg0KzQs ()D
public final fun component7-Ivn3T5g ()Lkorlibs/time/DateTime;
public final fun component8 ()Z
public final fun component9 ()Ldev/inmo/tgbotapi/types/message/MessageOrigin;
public final fun copy-AV2Nc88 (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/RequestGuestContentMessageImpl;
public static synthetic fun copy-AV2Nc88$default (Ldev/inmo/tgbotapi/types/message/RequestGuestContentMessageImpl;JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/RequestGuestContentMessageImpl;
public fun equals (Ljava/lang/Object;)Z
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent;
public fun getCost ()Ljava/lang/Integer;
public fun getDate-Wg0KzQs ()D
public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime;
public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo;
public fun getForwardOrigin ()Ldev/inmo/tgbotapi/types/message/MessageOrigin;
public fun getForwardable ()Z
public fun getFrom ()Ldev/inmo/tgbotapi/types/chat/User;
public fun getFromOffline ()Z
public fun getGuestQueryId-87nd9ik ()Ljava/lang/String;
public synthetic fun getGuestQueryId-BCLlPIY ()Ljava/lang/String;
public fun getHasProtectedContent ()Z
public fun getMediaGroupId-CsYhHCU ()Ljava/lang/String;
public fun getMessageId-APLFQys ()J
public fun getMetaInfo-fV8YnZ8 ()Lkotlin/Triple;
public fun getReplyInfo ()Ldev/inmo/tgbotapi/types/ReplyInfo;
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public fun getReplyTo ()Ldev/inmo/tgbotapi/types/message/abstracts/Message;
public fun getSenderBot ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
public fun getUser ()Ldev/inmo/tgbotapi/types/chat/User;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/message/SuggestedPostParameters {
public static final field Companion Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters$Companion;
public fun <init> ()V
@@ -27406,6 +27450,29 @@ public final class dev/inmo/tgbotapi/types/message/abstracts/AnonymousGroupConte
public static fun getSenderChat (Ldev/inmo/tgbotapi/types/message/abstracts/AnonymousGroupContentMessage;)Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/AnswerGuestContentMessage : dev/inmo/tgbotapi/types/message/abstracts/AnswerGuestMessage, dev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblySentViaBot {
public abstract fun getSenderBot ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
}
public final class dev/inmo/tgbotapi/types/message/abstracts/AnswerGuestContentMessage$DefaultImpls {
public static fun getBusinessConnectionId-nXr5wdE (Ldev/inmo/tgbotapi/types/message/abstracts/AnswerGuestContentMessage;)Ljava/lang/String;
public static fun getForwardInfo (Ldev/inmo/tgbotapi/types/message/abstracts/AnswerGuestContentMessage;)Ldev/inmo/tgbotapi/types/message/ForwardInfo;
public static fun getForwardable (Ldev/inmo/tgbotapi/types/message/abstracts/AnswerGuestContentMessage;)Z
public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/AnswerGuestContentMessage;)Lkotlin/Triple;
public static fun getReplyTo (Ldev/inmo/tgbotapi/types/message/abstracts/AnswerGuestContentMessage;)Ldev/inmo/tgbotapi/types/message/abstracts/Message;
public static fun getUser (Ldev/inmo/tgbotapi/types/message/abstracts/AnswerGuestContentMessage;)Ldev/inmo/tgbotapi/types/chat/User;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/AnswerGuestMessage : dev/inmo/tgbotapi/types/message/abstracts/GuestMessage {
public abstract fun getGuestBotCallerChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public abstract fun getGuestBotCallerUser ()Ldev/inmo/tgbotapi/types/chat/User;
}
public final class dev/inmo/tgbotapi/types/message/abstracts/AnswerGuestMessage$DefaultImpls {
public static fun getBusinessConnectionId-nXr5wdE (Ldev/inmo/tgbotapi/types/message/abstracts/AnswerGuestMessage;)Ljava/lang/String;
public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/AnswerGuestMessage;)Lkotlin/Triple;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage : dev/inmo/tgbotapi/abstracts/types/WithBusinessConnectionId, dev/inmo/tgbotapi/types/message/abstracts/FromUserMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblySentViaBotCommonMessage {
public abstract fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String;
public abstract fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;
@@ -27692,8 +27759,7 @@ public final class dev/inmo/tgbotapi/types/message/abstracts/GroupEventMessage$D
public static fun getUser (Ldev/inmo/tgbotapi/types/message/abstracts/GroupEventMessage;)Ldev/inmo/tgbotapi/types/chat/User;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage : dev/inmo/tgbotapi/types/message/abstracts/CommonContentMessage, dev/inmo/tgbotapi/types/message/abstracts/FromUserMessage, dev/inmo/tgbotapi/types/message/abstracts/GuestMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblySentViaBot, dev/inmo/tgbotapi/types/message/abstracts/SpecialMessage {
public abstract fun getGuestQueryId-87nd9ik ()Ljava/lang/String;
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage : dev/inmo/tgbotapi/types/message/abstracts/CommonContentMessage, dev/inmo/tgbotapi/types/message/abstracts/FromUserMessage, dev/inmo/tgbotapi/types/message/abstracts/GuestMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblySentViaBot {
}
public final class dev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage$DefaultImpls {
@@ -27705,10 +27771,12 @@ public final class dev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage
public static fun getUser (Ldev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage;)Ldev/inmo/tgbotapi/types/chat/User;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/GuestMessage : dev/inmo/tgbotapi/abstracts/types/WithOptionalGuestQueryId {
public abstract fun getGuestBotCallerChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public abstract fun getGuestBotCallerUser ()Ldev/inmo/tgbotapi/types/chat/User;
public abstract fun getGuestQueryId-87nd9ik ()Ljava/lang/String;
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/GuestMessage : dev/inmo/tgbotapi/types/message/abstracts/Message {
}
public final class dev/inmo/tgbotapi/types/message/abstracts/GuestMessage$DefaultImpls {
public static fun getBusinessConnectionId-nXr5wdE (Ldev/inmo/tgbotapi/types/message/abstracts/GuestMessage;)Ljava/lang/String;
public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/GuestMessage;)Lkotlin/Triple;
}
public final class dev/inmo/tgbotapi/types/message/abstracts/InaccessibleMessage : dev/inmo/tgbotapi/types/message/abstracts/Message {
@@ -27964,6 +28032,27 @@ public final class dev/inmo/tgbotapi/types/message/abstracts/PublicContentMessag
public static fun getReplyTo (Ldev/inmo/tgbotapi/types/message/abstracts/PublicContentMessage;)Ldev/inmo/tgbotapi/types/message/abstracts/Message;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage : dev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage, dev/inmo/tgbotapi/types/message/abstracts/RequestGuestMessage, dev/inmo/tgbotapi/types/message/abstracts/SpecialMessage {
}
public final class dev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage$DefaultImpls {
public static fun getBusinessConnectionId-nXr5wdE (Ldev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;)Ljava/lang/String;
public static fun getForwardInfo (Ldev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;)Ldev/inmo/tgbotapi/types/message/ForwardInfo;
public static fun getForwardable (Ldev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;)Z
public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;)Lkotlin/Triple;
public static fun getReplyTo (Ldev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;)Ldev/inmo/tgbotapi/types/message/abstracts/Message;
public static fun getUser (Ldev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;)Ldev/inmo/tgbotapi/types/chat/User;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/RequestGuestMessage : dev/inmo/tgbotapi/abstracts/types/WithOptionalGuestQueryId, dev/inmo/tgbotapi/types/message/abstracts/GuestMessage {
public abstract fun getGuestQueryId-87nd9ik ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/message/abstracts/RequestGuestMessage$DefaultImpls {
public static fun getBusinessConnectionId-nXr5wdE (Ldev/inmo/tgbotapi/types/message/abstracts/RequestGuestMessage;)Ljava/lang/String;
public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/RequestGuestMessage;)Lkotlin/Triple;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/SignedMessage : dev/inmo/tgbotapi/types/message/abstracts/ChatMessage {
public abstract fun getAuthorSignature ()Ljava/lang/String;
}
@@ -35003,16 +35092,16 @@ public final class dev/inmo/tgbotapi/types/update/EditMessageUpdate : dev/inmo/t
}
public final class dev/inmo/tgbotapi/types/update/GuestMessageUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseSentMessageUpdate {
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage;
public final fun component2 ()Ldev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;
public fun copy (Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)Ldev/inmo/tgbotapi/types/update/GuestMessageUpdate;
public synthetic fun copy (Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)Ldev/inmo/tgbotapi/types/update/abstracts/BaseSentMessageUpdate;
public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage;)Ldev/inmo/tgbotapi/types/update/GuestMessageUpdate;
public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/GuestMessageUpdate;JLdev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/GuestMessageUpdate;
public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;)Ldev/inmo/tgbotapi/types/update/GuestMessageUpdate;
public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/GuestMessageUpdate;JLdev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/GuestMessageUpdate;
public fun equals (Ljava/lang/Object;)Z
public synthetic fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;
public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/GuestContentMessage;
public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/RequestGuestContentMessage;
public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I

View File

@@ -0,0 +1,33 @@
package dev.inmo.tgbotapi.types.message
import korlibs.time.DateTime
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.CommonBot
import dev.inmo.tgbotapi.types.chat.PreviewChat
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.AnswerGuestContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.GuestContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage
import dev.inmo.tgbotapi.types.message.content.MessageContent
import kotlinx.serialization.SerialName
data class AnswerGuestContentMessageImpl<T: MessageContent>(
override val messageId: MessageId,
override val from: User,
override val chat: PreviewChat,
override val content: T,
override val date: DateTime,
override val editDate: DateTime?,
override val hasProtectedContent: Boolean,
override val forwardOrigin: MessageOrigin?,
override val replyInfo: ReplyInfo?,
override val replyMarkup: InlineKeyboardMarkup?,
override val senderBot: CommonBot,
override val mediaGroupId: MediaGroupId?,
override val guestBotCallerUser: User,
override val guestBotCallerChat: PreviewChat,
override val fromOffline: Boolean,
@SerialName(paidMessageStarCountField)
override val cost: Int? = null,
) : AnswerGuestContentMessage<T>

View File

@@ -19,7 +19,6 @@ import dev.inmo.tgbotapi.types.giveaway.*
import dev.inmo.tgbotapi.types.message.content.GiveawayContent
import dev.inmo.tgbotapi.types.location.Location
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
import dev.inmo.tgbotapi.types.polls.PollOptionAdded
import dev.inmo.tgbotapi.types.polls.PollOptionDeleted
import dev.inmo.tgbotapi.types.message.ChatEvents.*
@@ -457,448 +456,13 @@ internal data class RawMessage(
external_reply != null -> external_reply
else -> null
}
if (guest_query_id != null) {
GuestContentMessageImpl(
messageId = messageId,
from = checkedFrom ?: from ?: error("Was detected guest message, but owner (sender) of the message was not found"),
chat = chat,
guestQueryId = guest_query_id,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot,
mediaGroupId = media_group_id,
guestBotCallerUser = guest_bot_caller_user ?: error("For guest content message it is required to have user which called the bot"),
guestBotCallerChat = guest_bot_caller_chat ?: error("For guest content message it is required to have chat in that called the bot"),
fromOffline = is_from_offline,
cost = paid_star_count,
)
} else when (chat) {
is PreviewChannelDirectMessagesChat -> {
if (direct_messages_topic == null) error("direct_messages_topic must be presented for ChannelDirectMessagesChat messages")
val chatId = ChatIdWithChannelDirectMessageThreadId(
chat.id.chatId,
direct_messages_topic.threadId
)
val actualForumChat = when (chat) {
is ChannelDirectMessagesChatImpl -> chat.copy(id = chatId)
}
when (suggested_post_info) {
null -> {
when (sender_chat) {
is PreviewChannelChat -> FromChannelChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
is PreviewGroupChat,
null -> CommonChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in direct channel messages from non anonymous channels user must be specified"),
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag,
)
}
}
else -> {
when (sender_chat) {
is PreviewChannelChat -> FromChannelSuggestedChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
suggestedPostInfo = suggested_post_info,
cost = paid_star_count,
)
is PreviewGroupChat,
null -> CommonSuggestedChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in direct channel messages from non anonymous channels user must be specified"),
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
suggestedPostInfo = suggested_post_info,
cost = paid_star_count,
senderTag = sender_tag,
)
}
}
}
}
is PreviewPublicChat -> when (chat) {
is PreviewChannelChat -> if (is_paid_post) {
ChannelPaidPostImpl(
messageId = messageId,
chat = chat,
senderChat = checkedFrom ?: sender_chat ?: chat,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
} else {
ChannelContentMessageImpl(
messageId = messageId,
chat = chat,
senderChat = checkedFrom ?: sender_chat ?: chat,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
}
is PreviewForumChat -> when(chat) {
is ForumChatImpl -> {
if (messageThreadId != null) {
val chatId = ChatIdWithThreadId(
chat.id.chatId,
messageThreadId
)
val actualForumChat = when (chat) {
is ForumChatImpl -> chat.copy(id = chatId)
}
when (sender_chat) {
is PreviewChannelChat -> FromChannelForumContentMessageImpl(
chat = actualForumChat,
channel = sender_chat,
messageId = messageId,
threadId = messageThreadId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
is PreviewGroupChat -> AnonymousForumContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
threadId = messageThreadId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
null -> CommonForumContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
threadId = messageThreadId,
from = checkedFrom ?: from ?: error("It is expected that in messages from non anonymous users and channels user must be specified"),
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag,
)
}
} else {
when (sender_chat) {
is PreviewChannelChat -> if (is_automatic_forward == true) {
ConnectedFromChannelGroupContentMessageImpl(
chat = chat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
} else {
UnconnectedFromChannelGroupContentMessageImpl(
chat = chat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
}
is GroupChat -> AnonymousGroupContentMessageImpl(
chat = chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
null -> CommonGroupContentMessageImpl(
chat = chat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in messages from non anonymous users and channels user must be specified"),
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag
)
}
}
}
}
is PreviewGroupChat -> when (sender_chat) {
is PreviewChannelChat -> if (is_automatic_forward == true) {
ConnectedFromChannelGroupContentMessageImpl(
chat = chat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
} else {
UnconnectedFromChannelGroupContentMessageImpl(
chat = chat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
}
is PreviewGroupChat -> AnonymousGroupContentMessageImpl(
chat = chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
null -> CommonGroupContentMessageImpl(
chat = chat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in messages from non anonymous users and channels user must be specified"),
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag,
)
}
}
is PreviewPrivateChat -> if (business_connection_id == null) {
when {
is_topic_message == true -> {
val chatId = ChatIdWithThreadId(
chat.id.chatId,
messageThreadId ?: error("Was detected forum private message, but message thread id was not found")
)
val actualForumChat = when (chat) {
is PrivateForumChatImpl -> chat.copy(id = chatId)
is CommonUser -> chat.copy(id = chatId)
is CommonBot -> chat
is PrivateChatImpl -> PrivateForumChatImpl(
id = chatId,
username = chat.username,
firstName = chat.firstName,
lastName = chat.lastName
)
}
PrivateForumContentMessageImpl(
messageId = messageId,
from = checkedFrom ?: from ?: error("Was detected common message, but owner (sender) of the message was not found"),
threadId = messageThreadId,
threadCreatingInfo = forum_topic_created,
chat = actualForumChat,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
effectId = effect_id,
cost = paid_star_count,
)
}
else -> {
PrivateContentMessageImpl(
messageId = messageId,
from = checkedFrom ?: from
?: error("Was detected common message, but owner (sender) of the message was not found"),
chat = chat,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
effectId = effect_id,
cost = paid_star_count,
)
}
}
} else {
BusinessContentMessageImpl(
when {
guest_query_id != null -> {
RequestGuestContentMessageImpl(
messageId = messageId,
from = checkedFrom ?: from ?: error("Was detected common message, but owner (sender) of the message was not found"),
chat = BusinessChatImpl(
chat.id.toBusinessChatId(business_connection_id),
chat
),
businessConnectionId = business_connection_id,
from = checkedFrom ?: from ?: error("Was detected guest message, but owner (sender) of the message was not found"),
chat = chat,
guestQueryId = guest_query_id,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
@@ -908,12 +472,470 @@ internal data class RawMessage(
replyMarkup = reply_markup,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBusinessBot = sender_business_bot,
fromOffline = is_from_offline,
cost = paid_star_count,
)
}
else -> error("Unknown type of chat: $chat")
(guest_bot_caller_user ?: guest_bot_caller_chat) != null -> {
AnswerGuestContentMessageImpl(
messageId = messageId,
from = checkedFrom ?: from ?: error("Was detected guest message, but owner (sender) of the message was not found"),
chat = chat,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot ?: error("For guest answers sender bot must be presented"),
mediaGroupId = media_group_id,
guestBotCallerUser = guest_bot_caller_user ?: error("For guest content message it is required to have user which called the bot"),
guestBotCallerChat = guest_bot_caller_chat ?: error("For guest content message it is required to have chat in that called the bot"),
fromOffline = is_from_offline,
cost = paid_star_count,
)
}
else -> {
when (chat) {
is PreviewChannelDirectMessagesChat -> {
if (direct_messages_topic == null) error("direct_messages_topic must be presented for ChannelDirectMessagesChat messages")
val chatId = ChatIdWithChannelDirectMessageThreadId(
chat.id.chatId,
direct_messages_topic.threadId
)
val actualForumChat = when (chat) {
is ChannelDirectMessagesChatImpl -> chat.copy(id = chatId)
}
when (suggested_post_info) {
null -> {
when (sender_chat) {
is PreviewChannelChat -> FromChannelChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
is PreviewGroupChat,
null -> CommonChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in direct channel messages from non anonymous channels user must be specified"),
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag,
)
}
}
else -> {
when (sender_chat) {
is PreviewChannelChat -> FromChannelSuggestedChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
suggestedPostInfo = suggested_post_info,
cost = paid_star_count,
)
is PreviewGroupChat,
null -> CommonSuggestedChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in direct channel messages from non anonymous channels user must be specified"),
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
suggestedPostInfo = suggested_post_info,
cost = paid_star_count,
senderTag = sender_tag,
)
}
}
}
}
is PreviewPublicChat -> when (chat) {
is PreviewChannelChat -> if (is_paid_post) {
ChannelPaidPostImpl(
messageId = messageId,
chat = chat,
senderChat = checkedFrom ?: sender_chat ?: chat,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
} else {
ChannelContentMessageImpl(
messageId = messageId,
chat = chat,
senderChat = checkedFrom ?: sender_chat ?: chat,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
}
is PreviewForumChat -> when(chat) {
is ForumChatImpl -> {
if (messageThreadId != null) {
val chatId = ChatIdWithThreadId(
chat.id.chatId,
messageThreadId
)
val actualForumChat = when (chat) {
is ForumChatImpl -> chat.copy(id = chatId)
}
when (sender_chat) {
is PreviewChannelChat -> FromChannelForumContentMessageImpl(
chat = actualForumChat,
channel = sender_chat,
messageId = messageId,
threadId = messageThreadId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
is PreviewGroupChat -> AnonymousForumContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
threadId = messageThreadId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
null -> CommonForumContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
threadId = messageThreadId,
from = checkedFrom ?: from ?: error("It is expected that in messages from non anonymous users and channels user must be specified"),
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag,
)
}
} else {
when (sender_chat) {
is PreviewChannelChat -> if (is_automatic_forward == true) {
ConnectedFromChannelGroupContentMessageImpl(
chat = chat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
} else {
UnconnectedFromChannelGroupContentMessageImpl(
chat = chat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
}
is GroupChat -> AnonymousGroupContentMessageImpl(
chat = chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
null -> CommonGroupContentMessageImpl(
chat = chat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in messages from non anonymous users and channels user must be specified"),
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag
)
}
}
}
}
is PreviewGroupChat -> when (sender_chat) {
is PreviewChannelChat -> if (is_automatic_forward == true) {
ConnectedFromChannelGroupContentMessageImpl(
chat = chat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
} else {
UnconnectedFromChannelGroupContentMessageImpl(
chat = chat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
}
is PreviewGroupChat -> AnonymousGroupContentMessageImpl(
chat = chat,
messageId = messageId,
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
null -> CommonGroupContentMessageImpl(
chat = chat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in messages from non anonymous users and channels user must be specified"),
date = date.asDate,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag,
)
}
}
is PreviewPrivateChat -> if (business_connection_id == null) {
when {
is_topic_message == true -> {
val chatId = ChatIdWithThreadId(
chat.id.chatId,
messageThreadId ?: error("Was detected forum private message, but message thread id was not found")
)
val actualForumChat = when (chat) {
is PrivateForumChatImpl -> chat.copy(id = chatId)
is CommonUser -> chat.copy(id = chatId)
is CommonBot -> chat
is PrivateChatImpl -> PrivateForumChatImpl(
id = chatId,
username = chat.username,
firstName = chat.firstName,
lastName = chat.lastName
)
}
PrivateForumContentMessageImpl(
messageId = messageId,
from = checkedFrom ?: from ?: error("Was detected common message, but owner (sender) of the message was not found"),
threadId = messageThreadId,
threadCreatingInfo = forum_topic_created,
chat = actualForumChat,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
effectId = effect_id,
cost = paid_star_count,
)
}
else -> {
PrivateContentMessageImpl(
messageId = messageId,
from = checkedFrom ?: from
?: error("Was detected common message, but owner (sender) of the message was not found"),
chat = chat,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
effectId = effect_id,
cost = paid_star_count,
)
}
}
} else {
BusinessContentMessageImpl(
messageId = messageId,
from = checkedFrom ?: from ?: error("Was detected common message, but owner (sender) of the message was not found"),
chat = BusinessChatImpl(
chat.id.toBusinessChatId(business_connection_id),
chat
),
businessConnectionId = business_connection_id,
content = content,
date = date.asDate,
editDate = edit_date?.asDate,
hasProtectedContent = has_protected_content == true,
forwardOrigin = forward_origin,
replyInfo = replyInfo,
replyMarkup = reply_markup,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBusinessBot = sender_business_bot,
fromOffline = is_from_offline,
cost = paid_star_count,
)
}
else -> error("Unknown type of chat: $chat")
}
}
}
} ?: passport_data ?.let{
PassportMessage(

View File

@@ -7,10 +7,11 @@ import dev.inmo.tgbotapi.types.chat.CommonBot
import dev.inmo.tgbotapi.types.chat.PreviewChat
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.GuestContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage
import dev.inmo.tgbotapi.types.message.content.MessageContent
import kotlinx.serialization.SerialName
data class GuestContentMessageImpl<T: MessageContent>(
data class RequestGuestContentMessageImpl<T: MessageContent>(
override val messageId: MessageId,
override val from: User,
override val chat: PreviewChat,
@@ -24,9 +25,7 @@ data class GuestContentMessageImpl<T: MessageContent>(
override val replyMarkup: InlineKeyboardMarkup?,
override val senderBot: CommonBot?,
override val mediaGroupId: MediaGroupId?,
override val guestBotCallerUser: User,
override val guestBotCallerChat: PreviewChat,
override val fromOffline: Boolean,
@SerialName(paidMessageStarCountField)
override val cost: Int? = null,
) : GuestContentMessage<T>
) : RequestGuestContentMessage<T>

View File

@@ -0,0 +1,9 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.chat.PreviewChat
import dev.inmo.tgbotapi.types.chat.User
interface AnswerGuestMessage : GuestMessage {
val guestBotCallerUser: User
val guestBotCallerChat: PreviewChat
}

View File

@@ -1,12 +1,17 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.GuestQueryId
import dev.inmo.tgbotapi.types.chat.CommonBot
import dev.inmo.tgbotapi.types.message.content.MessageContent
interface GuestContentMessage<T: MessageContent> : SpecialMessage,
CommonContentMessage<T>,
sealed interface GuestContentMessage<T: MessageContent> : CommonContentMessage<T>,
GuestMessage,
FromUserMessage,
PossiblySentViaBot {
override val guestQueryId: GuestQueryId
}
interface AnswerGuestContentMessage<T : MessageContent> : GuestContentMessage<T>, AnswerGuestMessage, PossiblySentViaBot {
override val senderBot: CommonBot
}
interface RequestGuestContentMessage<T : MessageContent> : GuestContentMessage<T>, RequestGuestMessage, SpecialMessage

View File

@@ -1,12 +1,5 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.abstracts.types.WithOptionalGuestQueryId
import dev.inmo.tgbotapi.types.GuestQueryId
import dev.inmo.tgbotapi.types.chat.PreviewChat
import dev.inmo.tgbotapi.types.chat.User
interface GuestMessage : WithOptionalGuestQueryId {
override val guestQueryId: GuestQueryId
val guestBotCallerUser: User
val guestBotCallerChat: PreviewChat
}
sealed interface GuestMessage : Message

View File

@@ -0,0 +1,8 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.abstracts.types.WithOptionalGuestQueryId
import dev.inmo.tgbotapi.types.GuestQueryId
interface RequestGuestMessage : GuestMessage, WithOptionalGuestQueryId {
override val guestQueryId: GuestQueryId
}

View File

@@ -5,14 +5,15 @@ import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
import dev.inmo.tgbotapi.types.message.abstracts.CommonContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.GuestContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
data class GuestMessageUpdate(
override val updateId: UpdateId,
override val data: GuestContentMessage<*>
override val data: RequestGuestContentMessage<*>
) : BaseSentMessageUpdate {
/**
* @param newData Must be [GuestContentMessage]
*/
override fun copy(newData: AccessibleMessage) = copy(updateId, newData as GuestContentMessage<*>)
override fun copy(newData: AccessibleMessage) = copy(updateId, newData as RequestGuestContentMessage<*>)
}

View File

@@ -66,7 +66,7 @@ internal data class RawUpdate constructor(
private val deleted_business_messages: BusinessMessagesDeleted? = null,
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
private val guest_message: GuestContentMessage<*>? = null,
private val guest_message: RequestGuestContentMessage<*>? = null,
private val purchased_paid_media: PaidMediaPurchased? = null,
private val managed_bot: ManagedBotUpdated? = null,
) {

View File

@@ -267,7 +267,7 @@ fun <T : MediaGroupPartContent> List<CommonContentMessage<T>>.asMediaGroupMessag
suggestedPostInfo = sourceMessage.suggestedPostInfo,
cost = sourceMessage.cost,
)
is GuestContentMessage -> GuestContentMessageImpl(
is RequestGuestContentMessage -> RequestGuestContentMessageImpl(
messageId = sourceMessage.messageId,
from = sourceMessage.user,
chat = sourceMessage.chat,
@@ -281,6 +281,22 @@ fun <T : MediaGroupPartContent> List<CommonContentMessage<T>>.asMediaGroupMessag
replyMarkup = sourceMessage.replyMarkup,
senderBot = sourceMessage.senderBot,
mediaGroupId = sourceMessage.mediaGroupId,
fromOffline = sourceMessage.fromOffline,
cost = sourceMessage.cost,
)
is AnswerGuestContentMessage -> AnswerGuestContentMessageImpl(
messageId = sourceMessage.messageId,
from = sourceMessage.user,
chat = sourceMessage.chat,
content = content,
date = sourceMessage.date,
editDate = sourceMessage.editDate,
hasProtectedContent = sourceMessage.hasProtectedContent,
forwardOrigin = sourceMessage.forwardOrigin,
replyInfo = sourceMessage.replyInfo,
replyMarkup = sourceMessage.replyMarkup,
senderBot = sourceMessage.senderBot,
mediaGroupId = sourceMessage.mediaGroupId,
guestBotCallerUser = sourceMessage.guestBotCallerUser,
guestBotCallerChat = sourceMessage.guestBotCallerChat,
fromOffline = sourceMessage.fromOffline,