-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Mute: Nodes #9209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mute: Nodes #9209
Conversation
Xaositek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I'm no expert in the protobufs, it feels like we are making changes that goes backwards and not forwards. Let's ensure the PR only changes in-scope items. The changes to NodeDB.cpp, AdminModule.cpp and ExternalNotificationModule.cpp look great!
|
I actually really like this idea. I have multiple nodes, and it's a pain when I send a message from my mobile node, and it makes the desk node start alerting. We don't want to fully ignore the pocket node, just not make noise when it sends a message. That said, this doesn't need to get its own boolean in NodeInfoLite. Look at how is_key_manually_verified uses the bitfield. |
|
@jp-bennett I've made some changes. Let me know if this is looking better to you 📶 |
|
Looking good. We've still got Protobuf changes caught up in here, but we can shake those out once the next protobuf rebuild merge happens. |
Xaositek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meshtastic Code looks good, ready to see this implemented so we can start planning BaseUI changes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements functionality to mute specific nodes in the mesh network, allowing users to receive messages from muted nodes without triggering audio (buzzer) or visual (popup) notifications, except for bell alerts which still trigger notifications.
Changes:
- Added bitfield flag to track muted state in NodeInfoLite structure
- Modified ExternalNotificationModule to check muted status before triggering alerts
- Added AdminModule handler to toggle node muted state via admin commands
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/modules/ExternalNotificationModule.cpp | Checks muted node status before activating message, vibration, and buzzer alerts |
| src/modules/AdminModule.cpp | Handles toggle_muted_node admin command to set/unset muted flag |
| src/mesh/generated/meshtastic/mesh.pb.h | Adds is_muted boolean field to NodeInfo protobuf structure |
| src/mesh/generated/meshtastic/deviceonly.pb.h | Documents is_muted bitfield position in NodeInfoLite |
| src/mesh/generated/meshtastic/admin.pb.h | Adds toggle_muted_node field to AdminMessage protobuf |
| src/mesh/TypeConversions.cpp | Converts muted bitfield to boolean when creating NodeInfo from NodeInfoLite |
| src/mesh/NodeDB.h | Defines bitfield shift and mask constants for is_muted flag |
| protobufs | Updates subproject commit reference for protobuf changes |
* Regen protobufs * Ensure mute state is set when node is ignored * Added mechanism for toggling muted state * Implement the ability to mute specific nodes * Switch boolean value for bitmask * Correctly toggle bitfield position 2 on-change to mute state * Dont push submodule refs * Log correct info * Trunk fmt * Update protobuf ref to master branch of base * Update src/modules/ExternalNotificationModule.cpp Co-authored-by: Copilot <[email protected]> * Re-sync generated files --------- Co-authored-by: Jason P <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Jonathan Bennett <[email protected]>
Resolves #7943
Introduces mechanisms to mute message notifications received from certain nodes.
When a message is received from a muted node, the device's buzzer (if present) should not be activated. Drawing of any alert UI notification to the device's screen should also be blocked.
The exception to this is bell alerts (when activated), which should still sound the buzzer and display a notification.
It should be noted that this behaviour is distinctly different to ignoring a node - an action which blocks the message entirely. Muted messages can still be viewed in the messages menu of the device or client application, they are just delivered discreetly - similar to muting a channel.
Protobuf changes: meshtastic/protobufs#838
Docs: meshtastic/meshtastic#2038
🤝 Attestations