Fix for two "@" being displayed - if username already contains "@" #1

Closed
dcdunkan wants to merge 2 commits from main into main
dcdunkan commented 2021-11-09 12:58:39 +00:00 (Migrated from github.com)

Fix for two "@" being displayed if entered username already contains "@" at the beginning

image
See the URL also

The website's find bot text input currently supports "@" in the beginning and also the placeholding hint is "@username". And if the user enters a "@" in the input -> the results are showing right, but the head and URL to the bot are incorrect because they have an extra "@" in the username.

This PR,

  • Checks whether there is already "@" in the beginning, if there is, remove it in the t.me URL.
  • Checks whether there is already "@" in the beginning, and if not, adds one before the name.
  • This is expected to remove both issues.

Note: I couldn't run checks locally since there was an issue when trying to run yarn start. So, I am not sure if this can fix the issue though.

**Fix for two "@" being displayed if entered username already contains "@" at the beginning** ![image](https://user-images.githubusercontent.com/70066170/140927056-405a8ad8-d2f4-4e1d-8318-da4df7614280.png) _See the URL also_ The website's find bot text input currently supports "@" in the beginning and also the placeholding hint is "@username". And if the user enters a "@" in the input -> the results are showing right, but the head and URL to the bot are incorrect because they have an extra "@" in the username. This PR, - Checks whether there is already "@" in the beginning, if there is, remove it in the t.me URL. - Checks whether there is already "@" in the beginning, and if not, adds one before the name. - This is expected to remove both issues. **Note**: I couldn't run checks locally since there was an issue when trying to run `yarn start`. So, I am not sure if this can fix the issue though.
backmeupplz commented 2021-11-09 15:06:26 +00:00 (Migrated from github.com)

Thank you for the bug report and pull request! I fixed it a bit differently: github.com/backmeupplz/IsBotDown@cc69e0fc3e

Thank you for the bug report and pull request! I fixed it a bit differently: https://github.com/backmeupplz/IsBotDown/commit/cc69e0fc3e1aab20cba6912449cd8cc6edb9bb90

Pull request closed

Sign in to join this conversation.
No description provided.