mirror of https://github.com/embarklabs/embark.git
clean listenTo
This commit is contained in:
parent
d27ecb5b20
commit
d0a0fb49a7
|
@ -71,18 +71,10 @@ function listenTo(options, callback) {
|
|||
}
|
||||
|
||||
if (options.usePrivateKey === true) {
|
||||
if (options.privateKeyID) {
|
||||
subOptions.privateKeyID = options.privateKeyID;
|
||||
} else {
|
||||
subOptions.privateKeyID = sig;
|
||||
}
|
||||
} else {
|
||||
if (options.symKeyID) {
|
||||
subOptions.symKeyID = options.symKeyID;
|
||||
subOptions.privateKeyID = options.privateKeyID || sig;
|
||||
} else {
|
||||
subOptions.symKeyID = symKeyID;
|
||||
}
|
||||
}
|
||||
|
||||
promise.filter = subscribe("messages", subOptions)
|
||||
.on('data', function (result) {
|
||||
|
|
Loading…
Reference in New Issue