Skip to content

After upgrading to 22.4.*, cannot receive Updates correctly (webhook) #1436

Closed
@Smiuv

Description

@Smiuv

Hello, I use C# library. And after updating, I realized that the controller of my application does not convert the updates.

The following example:

[HttpPost]
public async Task<IActionResult> Update([FromBody]Update update)
{
    return Ok();
}

After a lot of testing I found that the date value of a message does not convert correctly and neither does the value of Message.Entities Such as type, which is equal to bot_command, cannot be identified, and that is what caused the error.

I tried to convert the following json manually but I got the above errors:

{"update_id":29643942,
"message":{"message_id":16864,"from":{"id":221136,"is_bot":false,"first_name":"Test","username":"Test","language_code":"en"},"chat":{"id":222136,"first_name":"Test","username":"Test","type":"private"},"date":1731493308,"text":"/start","entities":[{"offset":0,"length":6,"type":"bot_command"}]}}

message date error.
message entities error (type).
The json above is the update that caused the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions