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 Dec 18, 2023
1 parent afb165c commit e45e7a4
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,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 e45e7a4

Please sign in to comment.