diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-03-26 18:04:10 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-03-26 18:04:10 +0300 |
commit | e0298521c6c12c5f347431bfad5b6a4d7ab8b465 (patch) | |
tree | 317a7e635eab0badefdf632d0a308980ead66d1b /notification/notify_windows.go | |
parent | b31d96881432ebb1d4918ae970fabfd6362e1186 (diff) |
Add sounds to notifications
Diffstat (limited to 'notification/notify_windows.go')
-rw-r--r-- | notification/notify_windows.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/notification/notify_windows.go b/notification/notify_windows.go index 71c547d..d927ee1 100644 --- a/notification/notify_windows.go +++ b/notification/notify_windows.go @@ -18,15 +18,18 @@ package notification import "gopkg.in/toast.v1" -func Send(title, text string, critical bool) error { +func Send(title, text string, critical, sound bool) error { notification := toast.Notification{ AppID: "gomuks", Title: title, Message: message, - Audio: toast.IM, + Audio: toast.Silent, Duration: toast.Short, // Icon: ..., } + if sound { + notification.Audio = toast.IM + } if critical { notification.Duration = toast.Long } |