Use system notification sounds
Alternatively, there is per-platform support for specific sounds, but that would
require a larger investment:
- macOS: 9420a38fc3 (all-notification-options-with-their-defaults)
- Windows: https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh761492(v=win.10)
This commit is contained in:
parent
59e59fb754
commit
b5e7882267
1 changed files with 3 additions and 2 deletions
|
@ -89,11 +89,12 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var shouldPlayNotificationSound = storage.get('audio-notification') || false;
|
||||||
if (window.config.polyfillNotifications) {
|
if (window.config.polyfillNotifications) {
|
||||||
window.nodeNotifier.notify({
|
window.nodeNotifier.notify({
|
||||||
title: title,
|
title: title,
|
||||||
message: message,
|
message: message,
|
||||||
sound: false
|
sound: shouldPlayNotificationSound,
|
||||||
});
|
});
|
||||||
window.nodeNotifier.on('click', function(notifierObject, options) {
|
window.nodeNotifier.on('click', function(notifierObject, options) {
|
||||||
last.get('conversationId');
|
last.get('conversationId');
|
||||||
|
@ -103,7 +104,7 @@
|
||||||
body : message,
|
body : message,
|
||||||
icon : iconUrl,
|
icon : iconUrl,
|
||||||
tag : 'signal',
|
tag : 'signal',
|
||||||
silent : true
|
silent : !shouldPlayNotificationSound,
|
||||||
});
|
});
|
||||||
|
|
||||||
notification.onclick = this.onClick.bind(this, last.get('conversationId'));
|
notification.onclick = this.onClick.bind(this, last.get('conversationId'));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue