mirror of
https://github.com/vacp2p/waku-web-chat.git
synced 2026-01-09 21:28:04 -05:00
Read WakuMessage text
This commit is contained in:
@@ -118,7 +118,9 @@ class Chat {
|
||||
if (this.useWakuMessage) {
|
||||
console.info("Reading message as a WakuMessage")
|
||||
const msg = WakuMessage.decode(message.data)
|
||||
console.info("WakuMessage: ", msg.contentTopic, msg.payload)
|
||||
// XXX: Might not always work...
|
||||
const text = String.fromCharCode(...msg.payload)
|
||||
console.info("WakuMessage: ", msg.contentTopic, text)
|
||||
}
|
||||
else {
|
||||
//TODO Figure out how to re-enable / remove wrt chat2 example
|
||||
|
||||
Reference in New Issue
Block a user