An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Support sending notifications on HarmonyOS https://github.com/siyuan-note/siyuan/issues/17125
Daniel5d98257e51eb
diff --git a/app/src/mobile/util/onMessage.ts b/app/src/mobile/util/onMessage.tsindex 3b47e40208..dabaf88dd6 100644--- a/app/src/mobile/util/onMessage.ts+++ b/app/src/mobile/util/onMessage.ts@@ -28,6 +28,10 @@ export const onMessage = (app: App, data: IWebSocketData) => {if (window.JSAndroid.sendNotification) {window.JSAndroid.sendNotification(data.data.channel, data.data.title, data.data.body, data.data.delayInSeconds);}+ if (window.JSHarmony.sendNotification) {+ window.JSHarmony.sendNotification(data.data.channel, data.data.title, data.data.body, data.data.delayInSeconds);+ }+break;case "backgroundtask":if (!document.querySelector("#keyboardToolbar").classList.contains("fn__none") ||diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex 9348ebd9ad..78336d6900 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -274,6 +274,7 @@ interface Window {getScreenWidthPx(): numberexit(): voidsetWebViewFocusable(enable: boolean): void+ sendNotification(channel: string, title: string, body: string, delayInSeconds: number): void};Protyle: import("../protyle/method").default;diff --git a/kernel/api/notification.go b/kernel/api/notification.goindex 4b0a5a48cc..9922396e26 100644--- a/kernel/api/notification.go+++ b/kernel/api/notification.go@@ -34,9 +34,9 @@ func sendDeviceNotification(c *gin.Context) {return}- if util.ContainerAndroid != util.Container {+ if util.ContainerAndroid != util.Container && util.ContainerHarmony != util.Container {ret.Code = -1- ret.Msg = "Just support Android"+ ret.Msg = "Just support Android and HarmonyOS"return}