tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Add new information in updateMessageContent #2529

Closed BarnameESF closed 1 year ago

BarnameESF commented 1 year ago

Hello Do not be tired Is it possible to include the message sender's information in the updateMessageContent?

vincentneo commented 1 year ago

The message_id should be enough for you to reference a message, and likewise reference the sender_id.

BarnameESF commented 1 year ago

The message_id should be enough for you to reference a message, and likewise reference the sender_id.

When it is possible to include the sender_id in the received information as well as the message_id, I think it is better than sending a new request to Telegram with the message_id and receiving the sender_id. Especially if the number of edited messages is excessive, this will cause a large number of requests to Telegram, which may cause a limit!

vincentneo commented 1 year ago

this will cause a large number of requests to Telegram, which may cause a limit!

I am not 100% sure, if you have the message database enabled, this shouldn't happen, rather the library will just return the relevant values from the db.

I can't guarantee that though, I'm just a user of TDLib, just like you.

levlam commented 1 year ago

If app don't have the message, then it doesn't need updateMessageContent. TDLib will not send updateMessageContent for definitely unknown to the app messages.

BarnameESF commented 1 year ago

If app don't have the message, then it doesn't need updateMessageContent. TDLib will not send updateMessageContent for definitely unknown to the app messages.

Our service is in many groups and must manage all message edits. That's why we need the specifications of the message sender, which would be much easier if it were included in updateMessageContent. Of course, we can also get the sender's information through Messenger ID, but we are afraid that we will be limited by Telegram because there are many requests.

levlam commented 1 year ago

Then you need to use Bot API. User accounts aren't supposed to receive data that they don't see.