diff options
author | 2019-09-11 11:09:48 +0200 | |
---|---|---|
committer | 2019-09-11 11:09:48 +0200 | |
commit | 644e22b3862bdad12c57c6eb2b85226033391c20 (patch) | |
tree | aaf4d72fc42aba28b6604ab561b2673d8e1fc912 /src/stores | |
parent | Add @ZeroCool940711 as a contributor (diff) | |
parent | Add private notifications to features list (diff) | |
download | ferdium-app-644e22b3862bdad12c57c6eb2b85226033391c20.tar.gz ferdium-app-644e22b3862bdad12c57c6eb2b85226033391c20.tar.zst ferdium-app-644e22b3862bdad12c57c6eb2b85226033391c20.zip |
Merge branch 'private-notifications'
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/ServicesStore.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 876851a66..1debf69f6 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, |