aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar vantezzen <properly@protonmail.com>2019-09-08 10:44:12 +0200
committerLibravatar vantezzen <properly@protonmail.com>2019-09-08 10:44:12 +0200
commitc381775c9783b2af8c8ecc2c55e76aaab42ed3ef (patch)
tree4927aa4b86c03712cd7bf456a56fe9e0367b0715 /src/stores
parentFix errors in 5.3.0 version merge (diff)
downloadferdium-app-c381775c9783b2af8c8ecc2c55e76aaab42ed3ef.tar.gz
ferdium-app-c381775c9783b2af8c8ecc2c55e76aaab42ed3ef.tar.zst
ferdium-app-c381775c9783b2af8c8ecc2c55e76aaab42ed3ef.zip
Implement meetfranz/franz#879
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/ServicesStore.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 876851a66..3ee799b69 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -399,8 +399,17 @@ export default class ServicesStore extends Store {
399 } 399 }
400 400
401 if (service.isNotificationEnabled) { 401 if (service.isNotificationEnabled) {
402 const title = typeof args[0].title === 'string' ? args[0].title : service.name; 402 let title = 'Notification from ' + service.name;
403 options.body = typeof options.body === 'string' ? options.body : ''; 403 if (!this.stores.settings.all.app.privateNotifications) {
404 options.body = typeof options.body === 'string' ? options.body : '';
405 title = typeof args[0].title === 'string' ? args[0].title : service.name;
406 } else {
407 // Remove message data from notification in private mode
408 options.body = '';
409 options.icon = '/assets/img/notification-badge.gif';
410 }
411
412 console.log(title, options)
404 413
405 this.actions.app.notify({ 414 this.actions.app.notify({
406 notificationId: args[0].notificationId, 415 notificationId: args[0].notificationId,