MessageCommon::from
should be inside Message
#945
Labels
A-tba-types
Area: representation of telegram bot API types
C-core
crate: teloxide-core
call for contribution
Request for help from the community/contributors
FIXME
K-bug
Kind: bug
Milestone
A field
from
is missing from allMessageKind
types except ofMessageCommon
. E.g. it is not possible to find out who created the topic sinceForumTopicCreated
lacks it.An example could be found in the existing test
types::message::tests::topic_created
. The json value from the test is deserealized into the following value, note that the fieldfrom
is absent:Message { id: MessageId(4), thread_id: Some(ThreadId(MessageId(4))), date: 2023-02-01T05:25:39Z, chat: Chat { id: ChatId(-1001847508954), kind: Public(ChatPublic { title: Some("twest"), kind: Supergroup(PublicChatSupergroup { username: None, active_usernames: None, is_forum: true, sticker_set_name: None, can_set_sticker_set: None, permissions: None, slow_mode_delay: None, linked_chat_id: None, location: None, join_to_send_messages: None, join_by_request: None }), description: None, invite_link: None, has_protected_content: None }), photo: None, pinned_message: None, message_auto_delete_time: None, has_hidden_members: false, has_aggressive_anti_spam_enabled: false }, via_bot: None, kind: ForumTopicCreated(MessageForumTopicCreated { forum_topic_created: ForumTopicCreated { name: "???", icon_color: [142, 238, 152], icon_custom_emoji_id: Some("5312536423851630001") } }) }
Related: in the telegraf library, the base message type contains optional fields
from
,sender_chat
, andis_topic_message
. In teloxide, these are only present inMessageCommon
.The text was updated successfully, but these errors were encountered: