Only show desktop notifications for error/warn feedback messages
This commit is contained in:
parent
7a428f4dc8
commit
ba67f37473
@ -195,12 +195,14 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
converse.showFeedbackNotification = function (data) {
|
converse.showFeedbackNotification = function (data) {
|
||||||
|
if (data.klass === 'error' || data.klass === 'warn') {
|
||||||
var n = new Notification(data.subject, {
|
var n = new Notification(data.subject, {
|
||||||
body: data.message,
|
body: data.message,
|
||||||
lang: converse.i18n.locale_data.converse[""].lang,
|
lang: converse.i18n.locale_data.converse[""].lang,
|
||||||
icon: 'logo/conversejs.png'
|
icon: 'logo/conversejs.png'
|
||||||
});
|
});
|
||||||
setTimeout(n.close.bind(n), 5000);
|
setTimeout(n.close.bind(n), 5000);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
converse.handleChatStateNotification = function (evt, contact) {
|
converse.handleChatStateNotification = function (evt, contact) {
|
||||||
|
Loading…
Reference in New Issue
Block a user