klappvisor / haskell-telegram-api

Telegram Bot API for Haskell
BSD 3-Clause "New" or "Revised" License
201 stars 67 forks source link

Not capturing mentions on users who has username #118

Closed iokasimov closed 5 years ago

iokasimov commented 5 years ago

Hi Klappvisor, thank you for very much your package.

I've tried to find out this issue within Telegram API docs, but I got not luck.

When I mention a user who has no username I have proper MessageIntity:

MessageEntity 
    { me_type = "text_mention"
    , me_offset = 14
    , me_length = 4
    , me_url = Nothing
    , me_user = Just (User 
        { user_id = 304085128
        , user_first_name = ...
        , user_last_name = ...
        , user_username = Nothing
        , user_language_code = ...
        })
    }

But when I'm trying to mention a user who has username I got this:

MessageEntity 
    { me_type = "mention"
    , me_offset = 6
    , me_length = 7
    , me_url = Nothing
    , me_user = Nothing
    }

I don't know where is the problem - in client implementation or in API, maybe you know the answer.