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

Commit

Permalink
Merge pull request #24 from nakajisan/main
Browse files Browse the repository at this point in the history
Implement desktop notification options
  • Loading branch information
simonhamp authored Apr 27, 2024
2 parents bfd16e1 + 539e8a5 commit 65581c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/server/api/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const electron_1 = require("electron");
const utils_1 = require("../utils");
const router = express_1.default.Router();
router.post('/', (req, res) => {
const { title, body } = req.body;
const notification = new electron_1.Notification({ title, body });
const { title, body, subtitle, silent, icon, hasReply, timeoutType, replyPlaceholder, sound, urgency, actions, closeButtonText, toastXml } = req.body;
const notification = new electron_1.Notification({ title, body, subtitle, silent, icon, hasReply, timeoutType, replyPlaceholder, sound, urgency, actions, closeButtonText, toastXml });
notification.on("click", (event) => {
(0, utils_1.notifyLaravel)('events', {
event: '\\Native\\Laravel\\Events\\Notifications\\NotificationClicked',
Expand Down
4 changes: 2 additions & 2 deletions src/server/api/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {notifyLaravel} from "../utils";
const router = express.Router();

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

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

notification.on("click", (event)=>{
notifyLaravel('events', {
Expand Down

0 comments on commit 65581c8

Please sign in to comment.