Telegram messages (from bot or manual) how to avoid numbers becoming links on mobile?
Asked Answered
T

1

6

When sending or receiving message in Telegram containing numbers, I noticed they automatically become links on the mobile client if they contain 5 or more digits. Also if there is a dot in between.

For example, if there is 1234 or 12.34 in a message, all is good. However if a message contains 12345 or 123.45 or 12.345 it becomes a link. Example screenshot:

screenshot

Clicking it seems to open it as some sort of phone number.

This happens with messages I send manually, as well as through bots. Only on the mobile client (Android in my case), the same message looks fine in the web client.

When using prices or money amounts, it doesn't happen where there is a symbol directly attached to the number, like €249.95 but it does happen if there is space in between, e.g. € 249.95.

Is there some way, either when sending messages manually or when sending from a bot (using the sendRequest API function) to avoid numbers from being automatically converted into links?

Teledu answered 17/5, 2018 at 11:3 Comment(0)
O
1

you can set parse_mode on HTML, then markup the number as <code>:

pay <code>€249.95</code> for this service
Offish answered 18/5, 2018 at 8:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.