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-06-05 14:52:35 +0200
commit49feb276224dfa812339b94cfe52ea8f0ee5c491 (patch)
treec9e9c296b1f70fa4573442cd9065d53dc5d35eb5 /lib/main.js
parentda49b6460ae02a1a1f0e86aef8f541798730a18f (diff)
downloadbugzilla-triage-49feb276224dfa812339b94cfe52ea8f0ee5c491.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,