Skip to content

Commit 67b8a46

Browse files
committed
Rename params in update funcs.
1 parent ba63338 commit 67b8a46

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cfg/admlistflushinterval

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10 /* measures in update calls. Default is 10. */

main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ PhotoChannelPostHandler photoPostHandler(idPostChannel, postChannelName);
389389
BotCommandsHandler commandsHandler;
390390
AddAdminHandler 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

Comments
 (0)