use alert as default in notificationReceived

This commit is contained in:
Felix Wiedenbach 2021-10-15 06:17:03 +02:00
parent 460a9fc5f7
commit 026e624e23

View File

@ -145,13 +145,10 @@ Module.register("alert", {
notificationReceived(notification, payload, sender) {
if (notification === "SHOW_ALERT") {
if (typeof payload.type === "undefined") {
payload.type = "alert";
}
if (payload.type === "alert") {
this.showAlert(payload, sender);
} else if (payload.type === "notification") {
if (payload.type === "notification") {
this.showNotification(payload);
} else {
this.showAlert(payload, sender);
}
} else if (notification === "HIDE_ALERT") {
this.hideAlert(sender);