diff options
author | Gustavo Sampaio <gbritosampaio@gmail.com> | 2017-10-27 22:35:44 -0300 |
---|---|---|
committer | Gustavo Sampaio <gbritosampaio@gmail.com> | 2017-10-27 22:35:44 -0300 |
commit | 47681c90b0067d8b979f1a88253973fea49741bc (patch) | |
tree | e2e9b9b6bcda72dec5898b2b2d0e06733f8adb20 /src/stores/ServicesStore.js | |
parent | Merge pull request #152 from meetfranz/chore/travis-setup (diff) | |
download | ferdium-app-47681c90b0067d8b979f1a88253973fea49741bc.tar.gz ferdium-app-47681c90b0067d8b979f1a88253973fea49741bc.tar.zst ferdium-app-47681c90b0067d8b979f1a88253973fea49741bc.zip |
Add onNotify event to let recipes update/change notifications before send them.
Add additional checks in ServiceStore.
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 4510146e0..7e797ce55 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -295,9 +295,12 @@ export default class ServicesStore extends Store { | |||
295 | } | 295 | } |
296 | 296 | ||
297 | if (service.isNotificationEnabled) { | 297 | if (service.isNotificationEnabled) { |
298 | const title = typeof args[0].title === 'string' ? args[0].title : service.name; | ||
299 | options.body = typeof options.body === 'string' ? options.body : ''; | ||
300 | |||
298 | this.actions.app.notify({ | 301 | this.actions.app.notify({ |
299 | notificationId: args[0].notificationId, | 302 | notificationId: args[0].notificationId, |
300 | title: args[0].title, | 303 | title, |
301 | options, | 304 | options, |
302 | serviceId, | 305 | serviceId, |
303 | }); | 306 | }); |