Skip to content

fix: fix variable preventing notifications from implicitly being marked as read#606

Merged
staceybeard merged 1 commit intomainfrom
SB.fix-implicit-notification-read
Feb 26, 2026
Merged

fix: fix variable preventing notifications from implicitly being marked as read#606
staceybeard merged 1 commit intomainfrom
SB.fix-implicit-notification-read

Conversation

@staceybeard
Copy link
Copy Markdown
Member

@staceybeard staceybeard commented Feb 19, 2026

By submitting this merge request, I confirm the following:

Changes

When the sqlInterface was refactored to ECMAScript module syntax, the function updateReadStatus was changed to take as input a requestObject instead of individual parameters. However, two references to the old parameter userId were left behind, breaking implicit reading of notifications.

Replaced references to this parameter with requestObject.UserID to fix the query execution.

Dependencies

Issues

Closes opalmedapps/opal-app#1461

@staceybeard staceybeard self-assigned this Feb 19, 2026
@staceybeard staceybeard added the bug Something isn't working label Feb 19, 2026
Copy link
Copy Markdown
Member

@mschoettle mschoettle left a comment

Choose a reason for hiding this comment

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

LGTM!

I assume that userId shows up in an IDE as undeclared. If we were to enable eslint to detect just this would we be able to find cases like this automatically?

@staceybeard
Copy link
Copy Markdown
Member Author

LGTM!

I assume that userId shows up in an IDE as undeclared. If we were to enable eslint to detect just this would we be able to find cases like this automatically?

Thanks! Yes, the IDE shows it, but there are a lot of false positives due to attributes in the request objects. They would probably come up via eslint too.

@staceybeard staceybeard merged commit 7dacc50 into main Feb 26, 2026
6 checks passed
@staceybeard staceybeard deleted the SB.fix-implicit-notification-read branch February 26, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notification not marked as unread when reading the data item first

2 participants