aboutsummaryrefslogtreecommitdiffstats
path: root/lib/main.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-05-05 18:41:00 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-05-05 18:41:00 +0200
commit63c0e1c9ebeacb7bf103fcd35f7ee03d5f432756 (patch)
tree48270e02a99d7453b41d27b223757f118656e86b /lib/main.js
parent4b99c3d6a0efca79d94fc29398f0eab1fd75d492 (diff)
downloadbugzilla-triage-63c0e1c9ebeacb7bf103fcd35f7ee03d5f432756.tar.gz
Add makeJSONRPCCallWithLogin, and other small issues.
* Release 0.102 * Don't react on bugzilla.gnome.org per default * Simplify handling of preferences and debugging output.
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,