Removing minPow to be able to receive messages from mailserver
This commit is contained in:
parent
173dafe1e7
commit
c1161730d9
|
@ -123,7 +123,6 @@ class StatusJS {
|
|||
}
|
||||
|
||||
this.channels[channelName].subscription = this.shh.subscribe("messages", {
|
||||
minPow: POW_TARGET,
|
||||
symKeyID: this.channels[channelName].channelKey,
|
||||
topics: [this.channels[channelName].channelCode],
|
||||
allowP2P: true
|
||||
|
|
|
@ -39,7 +39,6 @@ class MailServers {
|
|||
if (!cb) return true;
|
||||
cb(null, true);
|
||||
}).catch((e) => {
|
||||
console.log(e);
|
||||
if (!cb) return;
|
||||
cb(e, false);
|
||||
});
|
||||
|
@ -55,6 +54,7 @@ class MailServers {
|
|||
|
||||
const topics = [this.web3.utils.sha3(topic).slice(0, 10)];
|
||||
const mailserverPeer = this.mailserver;
|
||||
|
||||
const timeout = options.timeout || 30; // seconds
|
||||
const symKeyID = this.symKeyID;
|
||||
const from = options.from || 0; // unix timestamp
|
||||
|
|
|
@ -9,11 +9,13 @@ var status = new StatusJS();
|
|||
await status.joinChat(channel);
|
||||
|
||||
status.onMessage(channel, (err, data) => {
|
||||
console.dir(data.payload);
|
||||
console.log(data.payload);
|
||||
});
|
||||
|
||||
status.mailservers.useMailserver("mail-02.gc-us-central1-a.eth.beta", (err, res) => {
|
||||
status.mailservers.requestMessages(channel, {}, (err, res) => { if(err) console.log(err); });
|
||||
status.mailservers.requestMessages(channel, {}, (err, res) => {
|
||||
if(err) console.log(err);
|
||||
});
|
||||
});
|
||||
|
||||
setInterval(() => { }, 3000);
|
||||
|
|
Loading…
Reference in New Issue