Skip to content

Commit

Permalink
[DIA-4076] Add consentLanguage in query for PM call from FLM (#572)
Browse files Browse the repository at this point in the history
* Add `consentLanguage` query

* Code review fix

* fix
  • Loading branch information
Nevazhnovu authored Jun 10, 2024
1 parent 2d6bd11 commit 678777a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ConsentViewController/Classes/SPConsentManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,13 @@ extension SPConsentManager: SPMessageUIDelegate {
nextMessageIfAny(controller)

case .ShowPrivacyManager:
guard let url = action.pmURL?.appendQueryItems(["site_id": String(propertyId)]) else {
guard var url = action.pmURL?.appendQueryItems(["site_id": String(propertyId)]) else {
onError(InvalidURLError(urlString: "Empty or invalid PM URL"))
return
}
if messageLanguage != .BrowserDefault {
url = url.appendQueryItems(["consentLanguage": String(messageLanguage.rawValue)]) ?? url
}
if let spController = controller as? SPMessageViewController {
spController.loadPrivacyManager(url: url)
}
Expand Down

0 comments on commit 678777a

Please sign in to comment.