Modersi / TelegramBotAPI

Telegram Bot API on C++ and Qt
MIT License
34 stars 19 forks source link

QVector< InputMediaPhoto> cannot be used #15

Open kleuter opened 5 months ago

kleuter commented 5 months ago

You cannot actually use any of Telegram::Bot::sendMediaGroup methods, because you cannot create such vectors as QVector<InputMediaPhoto> for example.

One can only create such vectors using initializers:

QVector< InputMediaPhoto> v = { InputMediaPhoto(new QFile()), InputMediaPhoto(new QFile()) };

But you cannot add new items to it:

v.emplace_back(InputMediaPhoto(new QFile()) );

Possible solution: const Type type = Type::PHOTO; must be changed to Type type = Type::PHOTO; in the header.