Watch: treat an empty threadId in a push as no thread
The gateway sends threadId "" on host notifications; tapping one now opens the feed instead of a thread that does not exist. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
9731fd621f
commit
7ad1045be4
2 files changed
+9
-3
No files matched your search
@@ -198,6 +198,8 @@ private let feedItemJSON = """
|
||||
// A host notification has no thread, so tapping it opens the feed.
|
||||
#expect(NotificationCommand(actionIdentifier: "com.apple.UNNotificationDefaultActionIdentifier", userInfo: [:], text: nil)
|
||||
== .open(nil))
|
||||
#expect(NotificationCommand(actionIdentifier: "com.apple.UNNotificationDefaultActionIdentifier", userInfo: ["hostId": "h", "threadId": ""], text: nil)
|
||||
== .open(nil))
|
||||
// Allow without a requestId cannot answer, so it opens the thread instead.
|
||||
#expect(NotificationCommand(actionIdentifier: "allow", userInfo: ["hostId": "h", "threadId": "t"], text: nil)
|
||||
== .open(.thread(hostId: "h", threadId: "t")))
|
||||
|
||||
Reference in new issue
Block a user