Permalink
Browse files

fixed open mailbox error bug

  • Loading branch information...
1 parent 6fd3b4e commit 030c3524c76ef16beadf077aad4ebc8409e2df23 Andris Reinman committed Aug 16, 2012
Showing with 8 additions and 7 deletions.
  1. +3 −5 examples/delete.js
  2. +1 −1 lib/client.js
  3. +3 −0 lib/xoauth.js
  4. +1 −1 package.json
View
@@ -24,10 +24,8 @@ client.on("connect", function(){
client.deleteMessage(message.UID, function(error){
console.log(arguments);
- })
- })
- })
-
+ });
+ });
+ });
});
-
});
View
@@ -979,7 +979,7 @@ IMAPClient.prototype._handlerTaggedSelect = function(callback, status, params){
error.errorType = "MailboxError";
error.errorLog = this._log.slice(0, this._logLength);
if(typeof callback == "function"){
- callback(null, error);
+ callback(error);
}else{
this.emit("error", error);
}
View
@@ -87,12 +87,15 @@ function generateXOAuthStr(options, callback){
}
signatureKey = escapeAndJoin([options.consumerSecret || "anonymous", ""]);
+
params.oauth_signature = hmacSha1(baseStr, signatureKey);
paramsStr = Object.keys(params).sort().map(function(key){
return key+"=\""+encodeURIComponent(params[key])+"\"";
}).join(",");
+ // Liidab kokku üheks pikaks stringiks kujul "METHOD URL BODY"
+ // 2-legged variandi puhul lisab BODY parameetritele otsa ka requestor_id väärtuse
returnStr = [options.method || "GET", requestUrl +
(options.requestorId ? "?xoauth_requestor_id=" + encodeURIComponent(options.requestorId) : ""), paramsStr].join(" ");
View
@@ -1,6 +1,6 @@
{
"name": "inbox",
- "version": "0.1.19",
+ "version": "0.1.20",
"author" : "Andris Reinman",
"maintainers":[
{

0 comments on commit 030c352

Please sign in to comment.