aboutsummaryrefslogtreecommitdiffstats
path: root/lib/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/main.js')
-rw-r--r--lib/main.js24
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/main.js b/lib/main.js
index 302dda8..431ffe6 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -101,12 +101,24 @@ var messageHandler = exports.messageHandler = function messageHandler(
break;
case "MakeJSONRPCall":
// url, login, method, params, callback
- libbz
- .makeJSONRPCCall(msg.data.url, msg.data.method,
- msg.data.params, function(ret) {
- worker.postMessage(new Message(msg.data.callRPC,
- ret));
- });
+ if (msg.data.login) {
+ libbz
+ .makeJSONRPCCallWithLogin(msg.data.url, msg.data.method,
+ msg.data.params, msg.data.login, function(ret) {
+ worker.postMessage(new Message(msg.data.callRPC,
+ ret));
+ }
+ );
+ }
+ else {
+ libbz
+ .makeJSONRPCCall(msg.data.url, msg.data.method,
+ msg.data.params, function(ret) {
+ worker.postMessage(new Message(msg.data.callRPC,
+ ret));
+ }
+ );
+ }
break;
case "GetURL":
libbz.getURL(msg.data.url,