@@ -389,7 +389,7 @@ PhotoChannelPostHandler photoPostHandler(idPostChannel, postChannelName);
389389BotCommandsHandler commandsHandler;
390390AddAdminHandler addAdminsHandler (postChannelName, adminIdsList, adminNamesList);
391391
392- void handle_update_message (CURL *c, json &res, bool &quit, size_t &updId )
392+ void handle_update_message (CURL *c, json &res, bool &quit, size_t &updateOffset )
393393{
394394 TgInteger fromId = 0 ;
395395 TgInteger chatId = 0 ;
@@ -400,10 +400,10 @@ void handle_update_message(CURL *c, json &res, bool &quit, size_t &updId)
400400 fromId = from[" id" ].get <TgInteger>();
401401 chatId = chat[" id" ].get <TgInteger>();
402402
403- updId = updId2 + 1 ;
403+ updateOffset = updId2 + 1 ;
404404}
405405
406- void handle_all_updates (CURL *c, json &upd, bool &quit, size_t &updId )
406+ void handle_all_updates (CURL *c, json &upd, bool &quit, size_t &updateOffset )
407407{
408408 auto &r = upd[" result" ];
409409 if (!r.is_array ()) {
@@ -412,7 +412,7 @@ void handle_all_updates(CURL *c, json &upd, bool &quit, size_t &updId)
412412 }
413413
414414 for (auto res : r) {
415- handle_update_message (c, res, quit, updId );
415+ handle_update_message (c, res, quit, updateOffset );
416416 }
417417}
418418
0 commit comments