No type = alert

This commit is contained in:
Paul-Vincent Roll 2016-04-03 20:34:47 +02:00
parent e323a315e1
commit f931316dc8
2 changed files with 2 additions and 1 deletions

View File

@ -78,7 +78,7 @@ self.sendNotification("SHOW_ALERT", {type: "notification"});
For alerts use:
```
self.sendNotification("SHOW_ALERT", {type: "alert"});
self.sendNotification("SHOW_ALERT", {});
```
### Notification params

View File

@ -94,6 +94,7 @@ Module.register('alert',{
},
notificationReceived: function(notification, payload, sender) {
if (typeof payload.type === 'undefined') { payload.type = "alert"; }
if (notification === 'SHOW_ALERT') {
if (payload.type == "alert"){
this.show_alert(payload, sender)