fix: Ensure that notifications on legacy http integrations navigate to the origin#1349
Merged
fadi-george merged 10 commits intoplayer-model-mainfrom Feb 26, 2026
Merged
fix: Ensure that notifications on legacy http integrations navigate to the origin#1349fadi-george merged 10 commits intoplayer-model-mainfrom
fadi-george merged 10 commits intoplayer-model-mainfrom
Conversation
02fee96 to
976d696
Compare
jkasten2
requested changes
Nov 25, 2025
Member
jkasten2
left a comment
There was a problem hiding this comment.
Logic looks good to me, just one comment on types.
6571574 to
beac82e
Compare
Contributor
|
Changes look good, I'll test it some more. |
6884031 to
5ab0bb0
Compare
c9d1df2 to
233eb9c
Compare
Code already handles each property separately so there's no reason to force passing the whole object.
There was an issue with legacy HTTP integrations where the defaultNotificationUrl was never saved in the DB. To account for this, we try to get the default URL from the app config on notification click and save it to the DB for the future use. Choosing between notification received and clicked to add this logic, decided on notification clicked to avoid doing extra api call when the user may never click the notification.
5ab0bb0 to
6a0bc4e
Compare
Contributor
|
Verified original issue and fix though had to use something like proxyman to give it my local built service worker. |
fadi-george
added a commit
that referenced
this pull request
Feb 26, 2026
…o the origin (#1349) Co-authored-by: Fadi George <fadii925@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ensure that notifications on legacy http integrations navigate to the origin
Details
There was an issue with legacy HTTP integrations where the defaultNotificationUrl was never saved in the DB. As the result if a notification was sent without explicit launch url, the service worker logic would default to the worker's scope which is in the os.tc domain. This in turn would redirect users to OneSignal dashboard rather than to the customer's site.
To account for missing default notification url, we try to get the default URL from the app config on notification click and save it to the DB for the future use. Choosing between notification received and clicked to add this logic, decided on notification clicked to avoid doing extra api call when the user may never click the notification.
Verified in Chrome, Firefox and Safari that when clicking on a notification it redirects to the origin instead of the os.tc domain.
Note: will only merge it after Thanksgiving
Systems Affected
Validation
Tests
There seem to be no tests for the service worker flows so didn't add any new ones 🤔 Did an extensive manual test in Chrome, Safari and Firefox.
Info
Checklist
Programming Checklist
Interfaces:
Functions:
Typescript:
Other:
elem of arraysyntax. PreferforEachor usemapcontextif possible. Instead, we can pass it to function/constructor so that we don't callOneSignal.contextScreenshots
Info
http.notification.click.fix.mov
Checklist
Related Tickets
https://app.asana.com/1/780103692902078/project/1211950939908862/task/1210115044974433?focus=true
This change is