mirror of
https://github.com/status-im/status-js-api.git
synced 2025-02-19 20:58:05 +00:00
Fix: Calling message handler on user message for websocket subscription
This commit is contained in:
parent
32d329d3a2
commit
9eae0d453d
@ -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); });
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user