Td: getMessage of channel

Created on 1 Feb 2018  路  8Comments  路  Source: tdlib/td

hi
i want call getmessage method on public channel like this https://t.me/myid/12345 but when send 12345 get invalid message how convert 12345 to correct message_id ? like this 4365221888 when gethistory say invalid_bot_method

really i need opposite this function

//@description Returns public HTTPS link to a message. Available only for messages in public channels @chat_id Identifier of the chat, message belongs to @message_id Identifier of the message
getPublicMessageLink chat_id:int53 message_id:int53 = PublicMessageLink;

Most helpful comment

Such function will be added in the future. For now you can pass (message_id * 1048576) as message_id to getMessage method as a workaround.

All 8 comments

Such function will be added in the future. For now you can pass (message_id * 1048576) as message_id to getMessage method as a workaround.

work great. tnx

Any updates on this issue?

Is there any way to get message id by its post value, without scanning all the messages requesting their public link, which is extremely heavy?

@zevlg

by its post value

what is a post value?

what is a post value?

Post value is the number at the end of the url https://t.me/myid/12345

i.e. 12345, but real message-id is something different

@zevlg #16 (comment)

ahh, thanks! missed this comment for some reason

The method getMessageLinkInfo for getting information about a link to a message in a chat was added in TDLib 1.5.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FJarvan picture FJarvan  路  3Comments

isopen picture isopen  路  5Comments

IRGC picture IRGC  路  4Comments

Invision70 picture Invision70  路  3Comments

mbj2007 picture mbj2007  路  4Comments