Skip to content

Commit

Permalink
don't show handlers if there arn't any
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Sep 21, 2021
1 parent 30d1e7e commit 906813b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,10 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & json
obj["type"] = emsdevice->device_type_name();
obj["name"] = emsdevice->to_string();
char result[200];
obj["handlers"] = emsdevice->show_telegram_handlers(result);
(void)emsdevice->show_telegram_handlers(result);
if (result[0] != '\0') {
obj["handlers"] = result; // don't show hanlders if there aren't any
}
}
}
}
Expand Down

0 comments on commit 906813b

Please sign in to comment.