mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-16 18:51:37 +00:00
fix(watch): parse encoded avatar URL
This commit is contained in:
@@ -9,6 +9,7 @@ struct WatchChatStatusLocalizationTests {
|
||||
#expect(snapshot.gatewayStatus.code == .gatewayProblem)
|
||||
#expect(snapshot.gatewayStatus.localizationKey == "Gateway update required")
|
||||
#expect(snapshot.gatewayStatus.verbatim == nil)
|
||||
#expect(snapshot.agentAvatarURL == "https://example.com/avatar.png")
|
||||
#expect(snapshot.talkStatus.code == .talkOff)
|
||||
#expect(snapshot.chatStatus?.code == .chatConnectIPhone)
|
||||
}
|
||||
@@ -158,6 +159,7 @@ struct WatchChatStatusLocalizationTests {
|
||||
],
|
||||
"gatewayConnected": false,
|
||||
"agentName": "Main",
|
||||
"agentAvatarURL": "https://example.com/avatar.png",
|
||||
"sessionKey": "main",
|
||||
"talkStatus": [
|
||||
"code": OpenClawWatchAppStatusCode.talkOff.rawValue,
|
||||
|
||||
@@ -500,7 +500,7 @@ struct WatchAppSnapshotMessage: Codable, Equatable {
|
||||
let gatewayConnected = Self.boolValue(payload["gatewayConnected"])
|
||||
let agentName = (payload["agentName"] as? String)?
|
||||
.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
|
||||
let agentAvatarURL = (payload["agentAvatarUrl"] as? String)?
|
||||
let agentAvatarURL = (payload["agentAvatarURL"] as? String)?
|
||||
.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
let agentAvatarText = (payload["agentAvatarText"] as? String)?
|
||||
.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
|
||||
Reference in New Issue
Block a user