go-toast

Send toast notifications in Windows
Log | Files | Refs | README | LICENSE

commit ec285b33a79cba505b5b27abee1c5e52c359f79f
parent c818d2a22a2a0439f8d45352d90bfc940486e717
Author: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Date:   Thu, 16 Jan 2025 17:35:16 +0800

wintoast: use global appID if set

This allows the notification struct to not have an AppID set.

Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>

Diffstat:
Mwintoast/bind.go | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/wintoast/bind.go b/wintoast/bind.go @@ -52,6 +52,9 @@ func Push(appID, xml string, op ...option) error { if opts.PowershellPreferred { return pushPowershell(xml) } + if appID == "" { + appID = appData.AppID + } if err := pushCOM(appID, xml); err != nil { if opts.PowershellFallback { return errors.Join(err, pushPowershell(xml))