Salz0 / telegram_flea

A open-source flea market bot, to be used in any Community
MIT License
9 stars 21 forks source link

Telegram users without usernames are mentioned incorrectly #41

Open ishevche opened 10 months ago

ishevche commented 10 months ago

Sellers without usernames are displayed incorrectly in the listing. For such users, their user IDs are displayed where the username is supposed to be, resulting in the mention @[some numbers here]. Such mentions are parsed by Telegram incorrectly, as it treats these IDs as actual usernames.

To Reproduce Steps to reproduce the behavior:

  1. Get a Telegram account without a username.
  2. Add an item using the bot.
  3. In the moderator chat or channel, the seller mention is displayed incorrectly and is not traversable.

Additional It is possible to create a link to a user using formatting: [some text](tg://user?id=), then, with the proper formatting method, "some text" will be displayed as a link to an account. With this method, there might be some issues with account privacy settings.

Salz0 commented 9 months ago

I would suggest after the /start command to request the user to either share their phone number, if their tag isn't there