clean listenTo

This commit is contained in:
Jonathan Rainville 2018-08-08 08:53:12 -04:00
parent b4acbfe740
commit 5ca0e2b592

View File

@ -71,17 +71,9 @@ function listenTo(options, callback) {
}
if (options.usePrivateKey === true) {
if (options.privateKeyID) {
subOptions.privateKeyID = options.privateKeyID;
} else {
subOptions.privateKeyID = sig;
}
subOptions.privateKeyID = options.privateKeyID || sig;
} else {
if (options.symKeyID) {
subOptions.symKeyID = options.symKeyID;
} else {
subOptions.symKeyID = symKeyID;
}
subOptions.symKeyID = symKeyID;
}
promise.filter = subscribe("messages", subOptions)