Fix: Calling message handler on user message for websocket subscription

This commit is contained in:
Richard Ramos 2018-11-30 10:02:18 -04:00
parent 32d329d3a2
commit 9eae0d453d

View File

@ -179,7 +179,6 @@ class StatusJS {
};
const messageHandler = (data) => {
console.log(data);
if(!this.contacts[data.sig]){
this.addContact(data.sig);
}
@ -223,7 +222,7 @@ class StatusJS {
});
} else {
this.userMessagesSubscription = this.shh.subscribe("messages", filters)
.on('data', (data) => messageHandler)
.on('data', (data) => { messageHandler(data); })
.on('error', (err) => { cb(err); });
}
}