Fix logic for adding email/sms subscriptions#1263
Closed
fadi-george wants to merge 3 commits intomainfrom
Closed
Conversation
8e0a6d0 to
7d07f04
Compare
sherwinski
approved these changes
Apr 9, 2025
jkasten2
requested changes
Apr 15, 2025
| public getLanguage(): string { | ||
| logMethodCall('getLanguage'); | ||
| return OneSignal.coreDirector.getPropertiesModel()?.data?.language; | ||
| return OneSignal.coreDirector.getPropertiesModel()?.data?.language || ''; |
Member
There was a problem hiding this comment.
This language change is unrelated to the scope of the PR. Was this an intended logic change?
| * Retrieves subscription models that match the given token and optionally OneSignal ID | ||
| * @param token - The token to search for in subscriptions | ||
| * @param onesignalId - Optional OneSignal ID to filter by | ||
| * @returns matching getSubscriptionModel and deletes duplicate subscriptions |
Member
There was a problem hiding this comment.
nit, the "... and deletes duplicate subscriptions" noted here doesn't describe the return value, but rather the side-effect of calling this function. Can we move this note to the function description. Lastly I would use the term "cleanup" rather than "delete" as it's a bit more specific here.
Contributor
Author
|
Closing in favor web refactor change |
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.
Description
1 Line Summary
Details
addSms and addEmail methods both do something like
so a new model key/id is made so creating new records in subscriptions table (edited)
Systems Affected
Validation
Tests
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
Checklist
Related Tickets
This change is