mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-11-06 20:03:06 +00:00
add helper method sender_tag for messages
This commit is contained in:
1 parent
8eb8e5ee1f
commit
2dd91f47d7
2 files changed
+4
No files matched your search
@@ -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
|
||||
|
||||
+3
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user