Files
barnard/notification_windows.go
T
Brandon McGintyandClaude Opus 5 97ec48534e bound notification delivery and expand placeholders once
Give the notification queue a buffer and drop events when it is full.
The channel was unbuffered, so a slow or hung notification command
blocked whichever UI or network callback happened to raise the event.

Expand the command placeholders in a single pass.
Substituting %event, then %who, then %what meant text arriving in an
earlier field could contain a later placeholder and have it expanded,
letting a remote user inject their own text into the command.

Move the command runner behind a build tag and drop the POSIX default
on Windows.
The helper script it pointed at does not exist there, so the default
was a command that could only fail.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 14:42:52 -04:00

10 lines
143 B
Go

//go:build windows
package main
import "os/exec"
func runNotification(command string) {
_ = exec.Command("cmd.exe", "/C", command).Run()
}