Skip to content

bug in email parsing: some bot commands are detected as email instead #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
adbenitez opened this issue Nov 2, 2023 · 1 comment · Fixed by #54
Closed

bug in email parsing: some bot commands are detected as email instead #53

adbenitez opened this issue Nov 2, 2023 · 1 comment · Fixed by #54
Labels
bug Something isn't working

Comments

@adbenitez
Copy link
Member

adbenitez commented Nov 2, 2023

commands like /command@[email protected] or /[email protected] are detected as email addresses, they look clickable like commands and you try them thinking they will be set as draft, instead you land in a new chat with that weird address (this is another issue but for desktop, the chat should not be immediately created but user should get asked for confirmation)

input:

expected:

[
    {
        "t": "BotCommandSuggestion",
        "c": "/command@[email protected]"
    }
]

actual:

[
    {
        "t": "EmailAddress",
        "c": "/command@bot"
    },
    {
        "t": "Text",
        "c": "@addr.com"
    }
]
@adbenitez adbenitez added the bug Something isn't working label Nov 2, 2023
@Simon-Laux Simon-Laux changed the title bug in email parsing bug in email parsing: some bot commands are detected as email instead Nov 2, 2023
@Simon-Laux
Copy link
Member

Simon-Laux commented Nov 3, 2023

could be related to #5. I'm not sure if / can be part of an email address, but even if that were the case I think the fix would just be to give BotCommandSuggestions a higher priority than email addresses.

Simon-Laux added a commit that referenced this issue Nov 16, 2023
…ss (#54)

* fix bot command suggestion with `@`- char was detected as email address

fixes #53

* fix fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants