mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-08 05:32:33 +01:00
🎨 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:
parent
487e27cb00
commit
51295adb4b
3 changed files with 10 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue