I created a telegram bot (for supergroups) on C# using Telegram.Bot library of the latest version for a moment 19.0.0. It's hosted on Azure Portal as Azure Function with Consumption plan type, so the function goes idle very often.
Everything in the function works correctly and expected except one thing: when the function goes idle and stays there for a while (at least for approximately 30 minutes), and one of the existing messages being reacted with emoji (there's how it looks like) the function is updated with edited_message, with that message that was reacted by someone.
The interesting thing is that if the function is active (is not idle) there're no updates to any reactions with emoji. Also, if I repeat the test case by posting a message, waiting until the function is asleep, and reacting to the message, it works only once. I mean one message updates the function with the edited_message state only at the first reaction, and there's no second update no matter how long I'll wait.
Reproducing:
- I post a message with the text "Message that has been posted a while ago", bot handles the update and reacts to it. The update from the telegram servers:
{
"update_id": 1,
"message": {
"message_id": 1,
"from": {
// sender information
},
"chat": {
// chat information
},
"date": 2023-08-04 19:00:00,
"text": "Message that has been posted a while ago"
}
}
- One hour after, when the function is sleeping, I react to that previous message with emoji, and get the update:
{
"update_id": 2,
"edited_message": {
"message_id": 1,
"from": {
// sender information (no changes here)
},
"chat": {
// chat information (no changes here)
},
"date": 2023-08-04 19:00:00,
"edit_date": 2023-08-04 20:00:00,
"text": "Message that has been posted a while ago" // (no changes here)
}
}
Why is the message edited? The message text is the same, and the message itself looks the same in the Telegram UI (when you edit the message, there appears the text near the time
edited, but noteditedin this case).Why can't I repeat the same action after one more hour (there's no update on the second attempt)?
Why don't I get such updates when the function is awake, only when it's asleep?
It confuses me so much and I would appreciate any help.