mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
iOS Watch: bridge mirrored notification actions into quick replies (#22123)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 401fbe8a7a
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
This commit is contained in:
@@ -1617,6 +1617,15 @@ private extension NodeAppModel {
|
||||
let result = try await self.watchMessagingService.sendNotification(
|
||||
id: req.id,
|
||||
params: params)
|
||||
if result.queuedForDelivery || !result.deliveredImmediately {
|
||||
let invokeID = req.id
|
||||
Task { @MainActor in
|
||||
await WatchPromptNotificationBridge.scheduleMirroredWatchPromptNotificationIfNeeded(
|
||||
invokeID: invokeID,
|
||||
params: params,
|
||||
sendResult: result)
|
||||
}
|
||||
}
|
||||
let payload = OpenClawWatchNotifyPayload(
|
||||
deliveredImmediately: result.deliveredImmediately,
|
||||
queuedForDelivery: result.queuedForDelivery,
|
||||
@@ -2550,6 +2559,12 @@ extension NodeAppModel {
|
||||
}
|
||||
}
|
||||
|
||||
extension NodeAppModel {
|
||||
func _bridgeConsumeMirroredWatchReply(_ event: WatchQuickReplyEvent) async {
|
||||
await self.handleWatchQuickReply(event)
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
extension NodeAppModel {
|
||||
func _test_handleInvoke(_ req: BridgeInvokeRequest) async -> BridgeInvokeResponse {
|
||||
|
||||
Reference in New Issue
Block a user