Skip to content

Commit

Permalink
Don't block user update if missing subscription header
Browse files Browse the repository at this point in the history
* In the preparation step for a User Update request, adding the push subscription ID header was actually blocking if it is not available.
* This probably shouldn't block updates.
  • Loading branch information
nan-li committed Feb 15, 2024
1 parent aa0a4cb commit 3b767e0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class OSRequestUpdateProperties: OneSignalRequest, OSUserRequest {
// Note Android adds it to requests, if the push sub ID exists
func prepareForExecution() -> Bool {
if let onesignalId = identityModel.onesignalId,
let appId = OneSignalConfigManager.getAppId(),
addPushSubscriptionIdToAdditionalHeaders() {
let appId = OneSignalConfigManager.getAppId() {
let _ = self.addPushSubscriptionIdToAdditionalHeaders()
self.addJWTHeader(identityModel: identityModel)
self.path = "apps/\(appId)/users/by/\(OS_ONESIGNAL_ID)/\(onesignalId)"
return true
Expand Down

0 comments on commit 3b767e0

Please sign in to comment.