mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 04:10:16 +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
c0724d70f5
commit
c5bffb68f1
3 changed files with 15 additions and 5 deletions
|
|
@ -58,9 +58,17 @@ func sendDeviceNotification(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
var delayInSeconds int
|
||||
if nil != arg["delayInSeconds"] {
|
||||
delayInSeconds = int(arg["delayInSeconds"].(float64))
|
||||
} else {
|
||||
delayInSeconds = 1
|
||||
}
|
||||
|
||||
util.BroadcastByType("main", "sendDeviceNotification", 0, "", map[string]interface{}{
|
||||
"title": title,
|
||||
"body": body,
|
||||
"title": title,
|
||||
"body": body,
|
||||
"delayInSeconds": delayInSeconds,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue