summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/TgLongPoll.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/TgLongPoll.cpp b/src/net/TgLongPoll.cpp
index 8d93991..30ce815 100644
--- a/src/net/TgLongPoll.cpp
+++ b/src/net/TgLongPoll.cpp
@@ -24,16 +24,16 @@
namespace TgBot {
-TgLongPoll::TgLongPoll(const Api* api, const EventHandler* eventHandler, int32_t limit, int32_t timeout, const std::shared_ptr<std::vector<std::string>>& stringarrayptr)
- : _api(api), _eventHandler(eventHandler), _limit(limit), _timeout(timeout), _stringarrayptr(stringarrayptr) {
+TgLongPoll::TgLongPoll(const Api* api, const EventHandler* eventHandler, int32_t limit, int32_t timeout, const std::shared_ptr<std::vector<std::string>>& allowupdates)
+ : _api(api), _eventHandler(eventHandler), _limit(limit), _timeout(timeout), _allowupdates(allowupdates) {
}
-TgLongPoll::TgLongPoll(const Bot& bot, int32_t limit, int32_t timeout, const std::shared_ptr<std::vector<std::string>>& stringarrayptr) :
- TgLongPoll(&bot.getApi(), &bot.getEventHandler(), limit, timeout, stringarrayptr) {
+TgLongPoll::TgLongPoll(const Bot& bot, int32_t limit, int32_t timeout, const std::shared_ptr<std::vector<std::string>>& allowupdates) :
+ TgLongPoll(&bot.getApi(), &bot.getEventHandler(), limit, timeout, allowupdates) {
}
void TgLongPoll::start() {
- std::vector<Update::Ptr> updates = _api->getUpdates(_lastUpdateId, _limit, _timeout, _stringarrayptr);
+ std::vector<Update::Ptr> updates = _api->getUpdates(_lastUpdateId, _limit, _timeout, _allowupdates);
for (Update::Ptr& item : updates) {
if (item->updateId >= _lastUpdateId) {
_lastUpdateId = item->updateId + 1;