notification is now clickable

This commit is contained in:
Christoph Scholz 2019-12-29 13:55:47 +01:00 committed by JC Brand
parent c15b4b3ac9
commit 7d94c712c8
2 changed files with 8 additions and 0 deletions

View File

@ -35,6 +35,7 @@
- #1792: Fix: modals don't have scrollbars
- #1796: Don't show "back" arrow navigation (on mobile) in the chat header when in `singleton` mode
- #1821: Errors caused by malformed URLs are now handled
- #1819: Click on a desktop notification now opens corresponding chat.
### Breaking changes

View File

@ -183,6 +183,13 @@ converse.plugins.add('converse-notification', {
if (_converse.notification_delay) {
setTimeout(n.close.bind(n), _converse.notification_delay);
}
n.onclick = function (event) {
event.preventDefault();
window.focus();
const chat = _converse.chatboxes.get(from_jid);
chat.maybeShow(true);
}
n.onclick.bind(_converse);
};
_converse.showChatStateNotification = function (contact) {