How to handle multiple photos in one message using TelegramLongPollingBot?

19 Views Asked by At

I am developing telegram bot on Java that should handle sending message with multiple photos to it.

The problem that per what I understood message with multiple photos technically recognised as separates message (one message - one photo).

So, when I use class Bot that extends TelegramLongPollingBot and override onUpdateReceived to get messages from telegram bot, I get Update object, in which there is Message object and Message object consists Photo object (list of different sizes for current image).

Is there a way to determine that multiple messages with photos related to one message? Or combine them in one Message to handle it in onUpdateReceived?

0

There are 0 best solutions below