mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
fix: channel bot respects bot_enabled flag
tryBotReplyChannel checked bot_channel_enabled but not bot_enabled, so disabling the bot via the main Enable toggle had no effect on channel replies. Added bot_enabled to the guard condition. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,7 @@ void MyMesh::tryBotReplyDM(const ContactInfo& from, const char* text) {
|
||||
}
|
||||
|
||||
void MyMesh::tryBotReplyChannel(uint8_t channel_idx, const char* text) {
|
||||
if (!(_prefs.bot_channel_enabled && _prefs.bot_trigger[0] && _prefs.bot_reply_ch[0] &&
|
||||
if (!(_prefs.bot_enabled && _prefs.bot_channel_enabled && _prefs.bot_trigger[0] && _prefs.bot_reply_ch[0] &&
|
||||
channel_idx == _prefs.bot_channel_idx &&
|
||||
millis() - _bot_last_ch_reply_ms > 10000UL))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user