This commit is contained in:
Ford Jones 2025-10-26 22:02:30 -06:00 committed by GitHub
commit 2714f846e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 4 deletions

View File

@ -1498,7 +1498,7 @@ int Screen::handleTextMessage(const meshtastic_MeshPacket *packet)
snprintf(banner, sizeof(banner), "New Message from\n%s", longName);
#endif
} else {
} else if (!node->is_muted) {
strcpy(banner, "New Message");
}
#if defined(M5STACK_UNITC6L)

View File

@ -369,6 +369,24 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
}
break;
}
case meshtastic_AdminMessage_set_muted_node_tag: {
LOG_INFO("Client received set_muted_node command");
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->set_muted_node);
if (node != NULL) {
node->is_muted = true;
saveChanges(SEGMENT_NODEDATABASE, false);
}
break;
}
case meshtastic_AdminMessage_remove_muted_node_tag: {
LOG_INFO("Client received remove_muted_node command");
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->remove_muted_node);
if (node != NULL) {
node->is_muted = false;
saveChanges(SEGMENT_NODEDATABASE, false);
}
break;
}
case meshtastic_AdminMessage_set_fixed_position_tag: {
LOG_INFO("Client received set_fixed_position command");
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum());

View File

@ -458,7 +458,9 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP
}
}
meshtastic_NodeInfoLite *sender = nodeDB->getMeshNode(mp.from);
meshtastic_Channel ch = channels.getByIndex(mp.channel ? mp.channel : channels.getPrimaryIndex());
if (moduleConfig.external_notification.alert_bell) {
if (containsBell) {
LOG_INFO("externalNotificationModule - Notification Bell");
@ -509,7 +511,7 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP
}
}
if (moduleConfig.external_notification.alert_message &&
if (moduleConfig.external_notification.alert_message && !sender->is_muted &&
(!ch.settings.has_module_settings || !ch.settings.module_settings.is_muted)) {
LOG_INFO("externalNotificationModule - Notification Module");
isNagging = true;
@ -521,7 +523,7 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP
}
}
if (moduleConfig.external_notification.alert_message_vibra &&
if (moduleConfig.external_notification.alert_message_vibra && !sender->is_muted &&
(!ch.settings.has_module_settings || !ch.settings.module_settings.is_muted)) {
LOG_INFO("externalNotificationModule - Notification Module (Vibra)");
isNagging = true;
@ -533,7 +535,7 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP
}
}
if (moduleConfig.external_notification.alert_message_buzzer &&
if (moduleConfig.external_notification.alert_message_buzzer && !sender->is_muted &&
(!ch.settings.has_module_settings || !ch.settings.module_settings.is_muted)) {
LOG_INFO("externalNotificationModule - Notification Module (Buzzer)");
if (config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY ||