Skip to content
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

After upgrading, cannot receive Updates correctly (webhook) #1436

Closed
Smiuv opened this issue Nov 13, 2024 · 1 comment
Closed

After upgrading, cannot receive Updates correctly (webhook) #1436

Smiuv opened this issue Nov 13, 2024 · 1 comment

Comments

@Smiuv
Copy link

Smiuv commented Nov 13, 2024

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.

@wiz0u
Copy link
Member

wiz0u commented Nov 13, 2024

@wiz0u wiz0u closed this as completed Nov 13, 2024
@wiz0u wiz0u changed the title Error converting an update to an update class. After upgrading, cannot receive Updates correctly (webhook) Nov 13, 2024
@wiz0u wiz0u pinned this issue Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants