tg://user?id=xxx buttons and inline links?
Suppose I send a message with text hello <a href="tg://user?id=xxx>User</a> and inline button with tg://user?id=xxx link.
a. If user HAS username and forwards set to ALL, then the text has a clickable link and button is visible, works fine.
b. If user HAS username and forwards set to NOBODY, then the text has NO clickable link (just plain text) but button is visible, works fine. Even though has_private_forwards is True.
c. If user DOESN'T HAVE username and forwards set to ALL, then the text has a clickable link and button is visible, works fine.
d. If user DOESN'T HAVE username and forwards set to NOBODY, then the text has no clickable link, but message cannot be sent, because of Bad Request: BUTTON_USER_PRIVACY_RESTRICTED
e. If (after [d]) I switch forwards from NOBODY to ALL, then clickable link appears immediately, but has_private_forward field from getChat call stays True for several minutes.
So, here are my questions:
1. Is long delay in [e] a bug or some server-side cache? Using public Bot API server.
2. Is has_private_forwards field THE ONLY sign of whether "inline link with ID" will be clickable or not?
3. Is has_private_forwards field THE ONLY sign of whether keyboard with "link with ID" button can be generated in chats without that ID?
Because [b] is unexpected, clients cannot click on users with usernames and private forwards while bots can generate buttons just fine. Inline text link becomes plain text, but the inline button can be shown and opens user's profile. I see this as inconsistent
Also if you put some absurd ID like "tg://user?id=1111111111111" (1 trillion ID), the button — suprise! — is created just fine, without any "BUTTON_USER_INVALID" and so on. Looks like yet another Telegram inconsistency (tm)
Обсуждают сегодня