Skip to content

Commit b49ea20

Browse files
committed
create email/sms subscription parameters update
* It seems we cannot send `enabled = true` without sending `notification_types` for creating an email or SMS. Even sending -99 is ok. * Or, we send neither. * The server is still in flux. For now, don't send any of these, but we need to revisit
1 parent 01327be commit b49ea20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserRequests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,9 @@ class OSRequestCreateSubscription: OneSignalRequest, OSUserRequest {
765765
var subscriptionParams: [String: Any] = [:]
766766
subscriptionParams["type"] = subscriptionModel.type.rawValue
767767
subscriptionParams["token"] = subscriptionModel.address
768-
subscriptionParams["enabled"] = subscriptionModel.enabled
769-
770-
// TODO: Add more to `subscriptionParams`?
768+
// 1/5/2023: For email and SMS, either send `enabled` AND `notification_types` or don't send either
769+
// TODO: ^ Backend changes may require us to come back and change this request's payload.
770+
// TODO: Since this is not used for push, don't send either of those. Revisit if we ever create push subscriptions with this request.
771771

772772
self.parameters = ["subscription": subscriptionParams]
773773
self.method = POST

0 commit comments

Comments
 (0)