From a0001a015a915fdefc7396d31b602d07ca2a821c Mon Sep 17 00:00:00 2001 From: Ben Arc Date: Mon, 19 Apr 2021 09:48:05 +0100 Subject: [PATCH] added message notification --- lnbits/extensions/copilot/templates/copilot/compose.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lnbits/extensions/copilot/templates/copilot/compose.html b/lnbits/extensions/copilot/templates/copilot/compose.html index a841a8a5..3ed18fb4 100644 --- a/lnbits/extensions/copilot/templates/copilot/compose.html +++ b/lnbits/extensions/copilot/templates/copilot/compose.html @@ -174,6 +174,7 @@ this.connection.addEventListener('open', function (event) { this.connection.send('') }) + var showNotif = this.showNotif this.connection.addEventListener('message', function (event) { res = event.data.split('-') @@ -241,7 +242,7 @@ } console.log(res[2]) if (res[2] != 'none') { - this.showNotif(res[2]) + showNotif(res[2]) } } })