Skip to content

Commit

Permalink
add refresh_device_metadata to create user request
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nan-li committed Nov 15, 2023
1 parent e1e02a2 commit 14c17da
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ class OSRequestCreateUser: OneSignalRequest, OSUserRequest {
propertiesObject["timezone_id"] = propertiesModel.timezoneId
params["properties"] = propertiesObject

params["refresh_device_metadata"] = true
self.parameters = params
self.updatePushSubscriptionModel(pushSubscriptionModel)
self.method = POST
Expand Down

0 comments on commit 14c17da

Please sign in to comment.