Skip to content

Commit

Permalink
lower casing when sening token request and setting in state
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaysubra committed Jun 4, 2024
1 parent e7bb686 commit bad4747
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/KlaviyoSwift/StateManagement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ struct KlaviyoReducer: ReducerProtocol {
return .none
}

let request = state.buildTokenRequest(apiKey: apiKey, anonymousId: anonymousId, pushToken: pushToken, enablement: enablement)
let request = state.buildTokenRequest(apiKey: apiKey, anonymousId: anonymousId, pushToken: pushToken.lowercased(), enablement: enablement)
state.enqueueRequest(request: request)
return .none

Expand Down Expand Up @@ -290,7 +290,7 @@ struct KlaviyoReducer: ReducerProtocol {
let enablement = KlaviyoState.PushEnablement(rawValue: requestData.enablementStatus) ?? .authorized
let backgroundStatus = KlaviyoState.PushBackground(rawValue: requestData.backgroundStatus) ?? .available
state.pushTokenData = KlaviyoState.PushTokenData(
pushToken: requestData.token,
pushToken: requestData.token.lowercased(),
pushEnablement: enablement,
pushBackground: backgroundStatus,
deviceData: requestData.deviceMetadata)
Expand Down

0 comments on commit bad4747

Please sign in to comment.