🎨 Support sending notifications on Android https://github.com/siyuan-note/siyuan/issues/17114

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-03-05 10:13:57 +08:00
parent 487e27cb00
commit 51295adb4b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 10 additions and 2 deletions

View file

@ -40,6 +40,13 @@ func sendDeviceNotification(c *gin.Context) {
return
}
var channel string
if nil != arg["channel"] {
channel = strings.TrimSpace(arg["channel"].(string))
} else {
channel = "SiYuan Notifications"
}
var title string
if nil != arg["title"] {
title = strings.TrimSpace(arg["title"].(string))
@ -66,6 +73,7 @@ func sendDeviceNotification(c *gin.Context) {
}
util.BroadcastByType("main", "sendDeviceNotification", 0, "", map[string]interface{}{
"channel": channel,
"title": title,
"body": body,
"delayInSeconds": delayInSeconds,