Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Sync Call #1223

Merged
merged 2 commits into from
Feb 15, 2025
Merged

Fix Sync Call #1223

merged 2 commits into from
Feb 15, 2025

Conversation

fadi-george
Copy link
Contributor

@fadi-george fadi-george commented Feb 14, 2025

Description

1 Line Summary

Updates the one signal api base requestHasAppId method to have a special condition for the sync/ call since it does not start /apps or have app_id in the body which leads to an error when calling downloadServerAppConfig.

Ticket: https://app.asana.com/0/1208777190614537/1209414057669993
Related issue: OneSignal/OneSignal-WordPress-Plugin#351

Details

  • updates requestHasAppId as described above

Systems Affected

  • WebSDK
  • Backend
  • Dashboard

Validation

Tests

Info

Checklist

  • All the automated tests pass or I explained why that is not possible
  • I have personally tested this on my machine or explained why that is not possible
  • I have included test coverage for these changes or explained why they are not needed

Programming Checklist
Interfaces:

  • Don't use default export
  • New interfaces are in model files

Functions:

  • Don't use default export
  • All function signatures have return types
  • Helpers should not access any data but rather be given the data to operate on.

Typescript:

  • No Typescript warnings
  • Avoid silencing null/undefined warnings with the exclamation point

Other:

  • Iteration: refrain from using elem of array syntax. Prefer forEach or use map
  • Avoid using global OneSignal accessor for context if possible. Instead, we can pass it to function/constructor so that we don't call OneSignal.context

Screenshots

Info

Checklist

  • I have included screenshots/recordings of the intended results or explained why they are not needed

Related Tickets



This change is Reviewable

Copy link
Contributor

@sherwinski sherwinski left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@sherwinski sherwinski left a comment

Choose a reason for hiding this comment

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

Sorry before I forget, could we add a test for this first before merging?

@fadi-george
Copy link
Contributor Author

Sorry before I forget, could we add a test for this first before merging?

Done.

Copy link
Contributor

@sherwinski sherwinski left a comment

Choose a reason for hiding this comment

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

Assuming that we may move this test back to the test directory (pending this comment), I'm good with this 👍

@fadi-george fadi-george merged commit 376bccb into main Feb 15, 2025
4 checks passed
@fadi-george fadi-george deleted the fg/sync-fix branch February 15, 2025 00:20
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.

2 participants