Skip to content

Commit 14c17da

Browse files
committed
add refresh_device_metadata to create user request
When the server receives a create user request, it doesn't automatically update IP and country for this user because this request can come from the SDK or from the customer's server. By passing in a `refresh_device_metadata = true` property to the request body, we can let the server know to update IP and country based on where the request originated from.
1 parent e1e02a2 commit 14c17da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserRequests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ class OSRequestCreateUser: OneSignalRequest, OSUserRequest {
643643
propertiesObject["timezone_id"] = propertiesModel.timezoneId
644644
params["properties"] = propertiesObject
645645

646+
params["refresh_device_metadata"] = true
646647
self.parameters = params
647648
self.updatePushSubscriptionModel(pushSubscriptionModel)
648649
self.method = POST

0 commit comments

Comments
 (0)