Skip to content

Commit 514c82b

Browse files
committed
Fix bug with messages with no text
1 parent 0cb317c commit 514c82b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ class ModifyAdminsHandler : public PostHandler {
299299
bool onUpdate(CURL *c, TgInteger fromId,
300300
TgInteger chatId, It it, const json &upd) override
301301
{
302+
if (upd.find("text") == upd.end()) {
303+
return true;
304+
}
305+
302306
bool has_text = upd["text"].is_string();
303307

304308
if (!has_text) {

0 commit comments

Comments
 (0)