Skip to content

feat(db): Add sender-based message filtering#4477

Merged
jamesarich merged 1 commit into
mainfrom
fix/ignore
Feb 6, 2026
Merged

feat(db): Add sender-based message filtering#4477
jamesarich merged 1 commit into
mainfrom
fix/ignore

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

This commit introduces the ability to filter messages based on the sender node. When a node is ignored, all existing and future messages from that node will be marked as filtered in the database.

Changes include:

  • A new DAO method updateFilteredBySender to bulk-update the filtered status of packets from a specific sender.
  • The PacketRepository now exposes a function to utilize this new DAO method.
  • The shouldFilterMessage logic in MeshDataHandler now immediately filters messages from ignored nodes.
  • Toggling the "ignore" status for a node now triggers an update to filter or un-filter all associated messages in the database.
  • Unit tests for MeshDataHandler have been added to verify new and existing functionality.

resolves #4466

This commit introduces the ability to filter messages based on the sender node. When a node is ignored, all existing and future messages from that node will be marked as filtered in the database.

Changes include:
- A new DAO method `updateFilteredBySender` to bulk-update the `filtered` status of packets from a specific sender.
- The `PacketRepository` now exposes a function to utilize this new DAO method.
- The `shouldFilterMessage` logic in `MeshDataHandler` now immediately filters messages from ignored nodes.
- Toggling the "ignore" status for a node now triggers an update to filter or un-filter all associated messages in the database.
- Unit tests for `MeshDataHandler` have been added to verify new and existing functionality.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@github-actions github-actions Bot added the bugfix PR tag label Feb 6, 2026
@codecov

codecov Bot commented Feb 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.22%. Comparing base (10df4d4) to head (2bb45db).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...a/com/geeksville/mesh/service/MeshActionHandler.kt 0.00% 5 Missing ⚠️
...ava/com/geeksville/mesh/service/MeshDataHandler.kt 0.00% 2 Missing ⚠️
...eshtastic/core/data/repository/PacketRepository.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #4477      +/-   ##
========================================
+ Coverage   8.56%   9.22%   +0.65%     
========================================
  Files        427     427              
  Lines      14326   14332       +6     
  Branches    2383    2385       +2     
========================================
+ Hits        1227    1322      +95     
+ Misses     12877   12757     -120     
- Partials     222     253      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Feb 6, 2026
Merged via the queue into main with commit fce8e7c Feb 6, 2026
9 checks passed
@jamesarich jamesarich deleted the fix/ignore branch February 6, 2026 15:25
@ckuttruff

Copy link
Copy Markdown

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Ignore Action fundamentally does not work as expected

2 participants