-
-
Notifications
You must be signed in to change notification settings - Fork 142
Get DTO #757
-
Hello,
I have been struggling with your Telegraph package for the second day now.
In your documentation (https://docs.defstudio.it/telegraph/v1/features/dto
), there is information about data received from the request wrapped into DTOs. How can I access these DTOs?
I have tried different approaches and went through the entire codebase of your project, but I still couldn’t understand where the public methods that return these DTOs are located.
At the moment, I am forced to work directly with the request.
I am really looking forward to your response. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 1 reply
-
the DTOs belongs to a received message through a webhook or a manual polling
for example here:
imageBeta Was this translation helpful? Give feedback.
All reactions
-
But there is no update_id in the message
Beta Was this translation helpful? Give feedback.
All reactions
-
Yes, I know that — I probably didn’t clarify my question properly.
I’m interested in TelegramUpdate, specifically update_id.
The problem I’m trying to solve is that Telegram often sends duplicate messages if the success response doesn’t arrive immediately. I’m receiving a huge number of incoming messages per second from the bot, and this happens quite often. My flow is Redis -> SceneManager -> Job -> Notificator.
So I absolutely need a way to check something like:
$this->message->updateId != $cache->getKey('update_id')->from('telegram_id')
Also, in:
protected function handleCallbackQuery(): void { $this->callbackQuery->data()->updateId }
there is no update_id either.
Beta Was this translation helpful? Give feedback.