15 lines
341 B
TypeScript
15 lines
341 B
TypeScript
import * as Bun from "bun";
|
|
|
|
export function sendNotification(title: string, body: string, click?: string | null) {
|
|
const command = [
|
|
"python",
|
|
"./app/notification.py",
|
|
`--title=${title}`,
|
|
`--body=${body}`,
|
|
];
|
|
if (click) {
|
|
command.push(`--click=${click}`);
|
|
}
|
|
Bun.spawn(command);
|
|
}
|