From c381775c9783b2af8c8ecc2c55e76aaab42ed3ef Mon Sep 17 00:00:00 2001 From: vantezzen Date: Sun, 8 Sep 2019 10:44:12 +0200 Subject: Implement meetfranz/franz#879 --- src/stores/ServicesStore.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/stores') 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 { } if (service.isNotificationEnabled) { - const title = typeof args[0].title === 'string' ? args[0].title : service.name; - options.body = typeof options.body === 'string' ? options.body : ''; + let title = 'Notification from ' + service.name; + if (!this.stores.settings.all.app.privateNotifications) { + options.body = typeof options.body === 'string' ? options.body : ''; + title = typeof args[0].title === 'string' ? args[0].title : service.name; + } else { + // Remove message data from notification in private mode + options.body = ''; + options.icon = '/assets/img/notification-badge.gif'; + } + + console.log(title, options) this.actions.app.notify({ notificationId: args[0].notificationId, -- cgit v1.2.3-54-g00ecf