Skip to content

Commit

Permalink
chore: Overriding device.type for VisionOS (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed-CIO committed Apr 4, 2024
1 parent 2e79b67 commit e1dab44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/DataPipeline/Plugins/Context.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ class Context: Plugin {
workingEvent.context = try JSON(context)
}

// Our push logic is currently hardcoded against ios
// this is the current mitigation to ensure push notification
// works for visionos till the backend handles "visionos"
if context[keyPath: "device.type"] as? String == "visionos" {
context[keyPath: "device.type"] = "ios"
}

// set the user agent
context["userAgent"] = userAgentUtil.getUserAgentHeaderValue()

Expand Down

0 comments on commit e1dab44

Please sign in to comment.