From 06bf3de8065765087a826fd33a6b7e2af84435dd Mon Sep 17 00:00:00 2001 From: Oskar Thoren Date: Mon, 19 Oct 2020 13:19:46 +0800 Subject: [PATCH] Show text received --- browser/libs/chat.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/browser/libs/chat.js b/browser/libs/chat.js index a978d56..74096a4 100644 --- a/browser/libs/chat.js +++ b/browser/libs/chat.js @@ -107,7 +107,13 @@ class Chat extends EventEmitter { // XXX: Might not always work... const text = String.fromCharCode(...msg.payload) console.info("WakuMessage: ", msg.contentTopic, text) + + this.emit('message', { + from: "Unknown", + data: text + }) } + else { //TODO Figure out how to re-enable / remove wrt chat2 example const request = Request.decode(message.data)