Link tg://user?id=... rendered as plain text

Viewed 36

Users A and B, start my Telegram bot with command /start. Bot sends to A message <a href="tg://user?id={B.user_id}">B</a>, to B <a href="tg://user?id={A.user_id}">A</a>. This way I want user to be able to contact each other. B receives working link to A profile. A receives just plain text "B".

What might be the reason that <a href="tg://user?id={B.user_id}">B</a> is rendered as plait text?

  • B does not have @username. I created test user C without @username, started bot, bot sent <a href="tg://user?id={C.user_id}">C</a> to A, A received working link to C.
  • Maybe B blocked my bot? I blocked bot with my test user C, bot sent sent A link to C, A received working link.
  • According to documentation "mentions are only guaranteed to work if the user has contacted the bot in the past". Both A and B contacted my bot with command /start.
0 Answers
Related