169 похожих чатов

[Bot API] @levlam Aliaksei, could you please explain some things about

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

1 ответов

21 просмотр
Groosha- Автор вопроса

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)

Похожие вопросы

Обсуждают сегодня

Привет всем. появился вопрос. Разрабатываю сайт, в данный момент он запущен. Хостинг beget. Добавляю на сайт яндекс метрику с помощью полей client-settings (взято отсюда http...
Andrew
2
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
а как ловят такое ghci> res <- getPos2 urlt 0 (alist !! 0) 200 ghci> res SearchAtom (Search "www.google.com" "/search?q=" "Haskell") "haskell.org" (SearchTS [(2024-05-06 07:...
Fedor
14
короче сгенерила мне эта штука код на ассемблере: struc string val { common local .value dq .value .value: if ~val eq db val end if db 0 } fo...
Vi Chapmann Chapmann
12
Есть тут те у кого дети есть + 2 работы + в зал ходят + в семейной жизни все хорошо?
Abdul-Aziz M.
13
Всем привет! Массив вводится с клавиатуры, кол-во элементов неизвестно, поэтому я указал arr db 100 dup(?) С нахождением максимума проблем нет, а вот минимум почему-то всегд...
En Vind Av Sorg
11
кто шарит: mattermost отслеживает что ты на пк запускаешь?
Valentin
13
Помогите, пожалуйста, делаю программу для для подсчёта корней квадратного уравнения, знаю, что есть куча недочётов, недоработок, но основная проблема в том, что почему-то при ...
NYC
13
в сях есть множество как в питоне? для удаление дубликатов
Linus
25
Всем привет! Стоит задачка, выбрать из выпадающего списка конкретный цвет. Пока реализовал через активацию контрола списка и выбора несколькими нажатиями стрелки вправо до нуж...
Роман.С
9
Карта сайта