Rename live activity tags#4670
Conversation
|
@rwarner Please check this will not impact other parts of the flow |
There was a problem hiding this comment.
Pull request overview
This PR renames several Live Activity wire-format keys used for webhook payloads and registration AppData, as well as the Keychain key used to persist the push-to-start token.
Changes:
- Renames the dismissed webhook payload key from
live_activity_tagtotag. - Renames the Keychain key for the push-to-start token.
- Renames the registration
AppDatafield used to report the push-to-start token.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Sources/Shared/LiveActivity/LiveActivityRegistry.swift | Changes webhook dismissed payload keys and the Keychain storage key for the push-to-start token. |
| Sources/Shared/API/HAAPI.swift | Changes the registration payload field name used to report the push-to-start token to HA. |
| static let webhookTypeDismissed = "mobile_app_live_activity_dismissed" | ||
| /// Keys in the dismissed webhook request data dictionary. | ||
| static let dismissedWebhookKeys: Set<String> = ["activity_id", "live_activity_tag", "reason"] | ||
| static let dismissedWebhookKeys: Set<String> = ["activity_id", "tag", "reason"] |
| // The relay server uses this token to start a Live Activity entirely via APNs. | ||
| if let pushToStartToken = LiveActivityRegistry.storedPushToStartToken { |
| data: [ | ||
| "activity_id": activityID, | ||
| "live_activity_tag": tag, | ||
| "tag": tag, |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4670 +/- ##
=======================================
Coverage ? 44.00%
=======================================
Files ? 280
Lines ? 17028
Branches ? 0
=======================================
Hits ? 7494
Misses ? 9534
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| } | ||
|
|
||
| static let pushToStartTokenKeychainKey = "live_activity_push_to_start_token" | ||
| static let pushToStartTokenKeychainKey = "live_activity_start_token" |
There was a problem hiding this comment.
In core I renamed it to live_activity_token. Is that fine or should I change it in core to live_activity_start_token?
There was a problem hiding this comment.
live_activity_token Is fine, I made a mistake here, thanks for the heads up
Summary
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes