diff --git a/src/plugins/converse-rai.js b/src/plugins/converse-rai.js index 83883cb39dfa4c21a21bc2e7dbfbd55b7fa7eb2c..4f185fec57bce72b3a5dbc0d4283e785d1634586 100644 --- a/src/plugins/converse-rai.js +++ b/src/plugins/converse-rai.js @@ -182,21 +182,6 @@ function emitNotification(jid, alert) { _converse.api.trigger('chatRoomActivityIndicators', jid); - - if (_converse.api.settings.get("rai_notification") && alert) - { - notifyText(_converse.api.settings.get("rai_notification_label"), jid, null, function (notificationId, buttonIndex) { - - if (buttonIndex == 0) - { - if (jid.includes("conference.")) { - _converse.api.rooms.open(jid); - } else { - _converse.api.chats.open(jid); - } - } - }); - } } function sendMarker(to_jid, id, type) @@ -213,24 +198,4 @@ _converse.api.send(stanza); } - - function notifyText(message, title, notifyId, callback) - { - if (!notifyId) notifyId = Math.random().toString(36).substr(2, 9); - - var prompt = new Notification(title, { - body: message, - requireInteraction: true - }); - - prompt.onclick = function (event) { - event.preventDefault(); - if (callback) callback(notifyId, 0); - } - - prompt.onclose = function (event) { - event.preventDefault(); - if (callback) callback(notifyId, 1); - } - } }));