Skip to content

Commit e45e7a4

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 afb165c commit e45e7a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

iOS_SDK/OneSignalSDK/OneSignalUser/Source/Requests/OSRequestCreateUser.swift

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

85+
params["refresh_device_metadata"] = true
8586
self.parameters = params
8687
self.updatePushSubscriptionModel(pushSubscriptionModel)
8788
self.method = POST

0 commit comments

Comments
 (0)