Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit 65581c8

Browse files
authored
Merge pull request #24 from nakajisan/main
Implement desktop notification options
2 parents bfd16e1 + 539e8a5 commit 65581c8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/server/api/notification.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const electron_1 = require("electron");
88
const utils_1 = require("../utils");
99
const router = express_1.default.Router();
1010
router.post('/', (req, res) => {
11-
const { title, body } = req.body;
12-
const notification = new electron_1.Notification({ title, body });
11+
const { title, body, subtitle, silent, icon, hasReply, timeoutType, replyPlaceholder, sound, urgency, actions, closeButtonText, toastXml } = req.body;
12+
const notification = new electron_1.Notification({ title, body, subtitle, silent, icon, hasReply, timeoutType, replyPlaceholder, sound, urgency, actions, closeButtonText, toastXml });
1313
notification.on("click", (event) => {
1414
(0, utils_1.notifyLaravel)('events', {
1515
event: '\\Native\\Laravel\\Events\\Notifications\\NotificationClicked',

src/server/api/notification.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import {notifyLaravel} from "../utils";
44
const router = express.Router();
55

66
router.post('/', (req, res) => {
7-
const {title, body} = req.body
7+
const {title, body, subtitle, silent, icon, hasReply, timeoutType, replyPlaceholder, sound, urgency, actions, closeButtonText, toastXml} = req.body
88

9-
const notification = new Notification({title, body});
9+
const notification = new Notification({title, body, subtitle, silent, icon, hasReply, timeoutType, replyPlaceholder, sound, urgency, actions, closeButtonText, toastXml});
1010

1111
notification.on("click", (event)=>{
1212
notifyLaravel('events', {

0 commit comments

Comments
 (0)