Open PhardAlef opened 3 years ago
t.me/@id1234567 links don't work on Android too (edit: but works on iOS)
It's now available in TD x64: https://t.me/tg_x64/166 Make a pr.
Following @M299792458 advice, I made a PR based on https://github.com/TDesktop-x64, cherrypicking the commits
@john-preston from the PR
A link to a specific message is even a more strange feature. You can't know any valid message id in someone else inbox, and you have no way of getting a message id or user id in any of the official apps
There is one usecase here; bots can know message IDs from their private chats and the user's chat ID. Bots can create links to messages in their private chat with the user.
it will or won't work depending on did you or did you not see this user (in a group or in chats list) in this exact session.
If that's the limitation, we just have to live with that limitation then.
@MKRhere well, sent inline result's message ids are not supposed to be relied on as real inbox message ids and nobody promises anywhere in docs that those ids are going to match, so this is not a supported use case anyway. They are supposed to be used only from the bots side in his internal process.
@john-preston I'm not talking about inline query result. I'm talking about the bot's private chat.
(I had a user ask for this in the Telegraf bot framework's support chat, which is why I ask.)
@MKRhere Hmm. How do you get message id in users inbox in bot's private chats on bot's side?
For messages from the user, we receive the message update, and we're able to access: update.chat.id
and update.message.message_id
.
For messages sent by the bot, as a response to sendMessage
, similar to:
const message = telegram.sendMessage({ chatId, text });
message.message_id;
@MKRhere This is message_id in the bots messages box, not the message_id in users messages box. As with chats between users the message_ids for one private chat party is unrelated to message_ids for the second party.
@MKRhere Each user has his messages box ids start with 1 (I think, or smth like that), so if you take several different users, each of whom just joined Telegram, opened chat with the bot and sent him a "/start" message, for every user this message will have ID = 1, while for the bot the message_ids of those messages would be different.
Like Android and iOS tg://openmessage?user_id=142364654 t.me/@id142364654 opens the profile of person, having group/chat in common (or going directly to a private message, by including message id too)