Skip to content

Fix #82: Filter blocked contacts from notification query - #346

Open
navneetsingh-dev wants to merge 1 commit into
GrapheneOS:mainfrom
navneetsingh-dev:fix-blocked-contacts
Open

navneetsingh-dev wants to merge 1 commit into
GrapheneOS:mainfrom
navneetsingh-dev:fix-blocked-contacts

Conversation

@navneetsingh-dev

@navneetsingh-dev navneetsingh-dev commented Sep 27, 2026 •

Copy link
Copy Markdown

Resolves #82. This new branch includes the clean commit history and the updated SQL query to preserve senderless notifications as requested by @thestinger

@RankoR RankoR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to other comments:

  1. Why changes other than to two java files are needed?
  2. Tests are missing. Such changes must be well covered by tests

+ " AND "
+ "(" + DatabaseHelper.PARTICIPANTS_TABLE + "." + ParticipantColumns.BLOCKED
+ " = 0 OR " + DatabaseHelper.PARTICIPANTS_TABLE + "."
+ ParticipantColumns._ID + " IS NULL)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing closing ).
Can be fixed with ParticipantColumns._ID + " IS NULL))" or, better, ifnull(participants.blocked, 0) = 0

final String contentLocation, final int subId, final String subPhoneNumber,
final int statusIfFailed, final boolean autoDownload, final String transactionId,
final int resultCode) {
final Uri notificationUri, final String conversationId, final String participantId,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert indentation changes

@navneetsingh-dev
navneetsingh-dev force-pushed the fix-blocked-contacts branch 3 times, most recently from b610495 to f6d9422 Compare September 27, 2026 21:01
@navneetsingh-dev

Copy link
Copy Markdown
Author

All requested changes are complete and the CI checks are fully passing!

Applied the ifnull logic for blocked contacts.

Reverted the accidental formatting in ProcessDownloadedMmsAction.java.

Added a clean, passing regression test for the new logic.

Let me know if there's anything else you need before merging

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blocking contacts does not block notification sounds

2 participants