1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-03-03 09:22:22 +00:00

add helper method sender_tag for messages

This commit is contained in:
2026-03-02 17:40:47 +06:00
parent 8eb8e5ee1f
commit 2dd91f47d7
2 changed files with 4 additions and 0 deletions

View File

@@ -3165,6 +3165,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/extensions/raw/MessageKt {
public static final fun getReply_markup (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public static final fun getReply_to_message (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/Message;
public static final fun getSender_chat (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public static final fun getSender_tag (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ljava/lang/String;
public static final fun getSticker (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/files/Sticker;
public static final fun getSuccessful_payment (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/payments/SuccessfulPayment;
public static final fun getSupergroup_chat_created (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Z

View File

@@ -28,6 +28,9 @@ inline val Message.from: User?
inline val Message.sender_chat: PreviewChat?
get() = withSenderChatMessageOrNull() ?.senderChat
@RiskFeature(RawFieldsUsageWarning)
inline val Message.sender_tag: UserTag?
get() = potentiallyFromUserGroupContentMessageOrNull() ?.senderTag
@RiskFeature(RawFieldsUsageWarning)
inline val Message.forward_from: User?
get() = asPossiblyForwardedMessage() ?.forwardInfo ?.asUserForwardInfo() ?.from
@RiskFeature(RawFieldsUsageWarning)