Closed yuminekosan closed 1 month ago
Information about the replied message is returned in the reply_to:MessageReplyTo
of the message
object. If it is null
, then the message isn't a reply.
Here is the structure of the message, which is a response to another message. Null is returned in the reply_to field, although the screenshot below shows that the message is a response
{
"@type": "message",
"@extra": "",
"id": 263981105152,
"sender_id": {
"@type": "messageSenderUser",
"@extra": "",
"user_id": 6850013756
},
"chat_id": 6850013756,
"sending_state": null,
"scheduling_state": null,
"is_outgoing": false,
"is_pinned": false,
"is_from_offline": false,
"can_be_saved": true,
"has_timestamped_media": false,
"is_channel_post": false,
"is_topic_message": false,
"contains_unread_mention": false,
"date": 1727427752,
"edit_date": 0,
"forward_info": {
"@type": "",
"@extra": "",
"origin": null,
"date": 0,
"source": null,
"public_service_announcement_type": ""
},
"import_info": null,
"interaction_info": null,
"unread_reactions": [],
"fact_check": null,
"reply_to": null,
"message_thread_id": 0,
"saved_messages_topic_id": 0,
"self_destruct_type": null,
"self_destruct_in": 0,
"auto_delete_in": 0,
"via_bot_user_id": 0,
"sender_business_bot_user_id": 0,
"sender_boost_count": 0,
"author_signature": "",
"media_album_id": 0,
"effect_id": 0,
"has_sensitive_content": false,
"restriction_reason": "",
"content": {
"@type": "messageText",
"@extra": "",
"text": {
"@type": "formattedText",
"@extra": "",
"text": "Ничего",
"entities": []
},
"link_preview": {
"@type": "",
"@extra": "",
"url": "",
"display_url": "",
"site_name": "",
"title": "",
"description": null,
"author": "",
"type": null,
"has_large_media": false,
"show_large_media": false,
"show_media_above_description": false,
"skip_confirmation": false,
"show_above_text": false,
"instant_view_version": 0
},
"link_preview_options": null
},
"reply_markup": null
}
Likely, you use a wrapper for TDLib 1.8.36 with an old TDLib version. Check response of the request getOption("version")
.
Yes, you were right. I looked at the version and found that the tdlib image is 1.8.13. Apparently I was provided with the wrong version. Im sorry
I apologize in advance for my English, but I ran into such a problem.
I am working with tdlib latest version (1.8.36) and a shell for golang. When receiving UpdateNewMessage, reply_message_id was previously returned - the identifier for the message that was answered by the current incoming message.
Now the structure of the object has changed and this field has disappeared. I thought that the reply_to field would contain the necessary information about the message that was answered, but tdlib stubbornly returns null to me. Tell me an alternative way to get information about the message that was answered