|
|
@ -29859,15 +29859,14 @@ TwisterAccount.prototype.updateProfile = function (newdata,cbfunc) { |
|
|
|
profile._revisionNumber+1, |
|
|
|
profile._revisionNumber+1, |
|
|
|
function(result){ |
|
|
|
function(result){ |
|
|
|
|
|
|
|
|
|
|
|
var TwisterProfile = require("../TwisterProfile.js"); |
|
|
|
var newprofile = Twister.getUser(thisAccount._name)._profile; |
|
|
|
|
|
|
|
newprofile._data = newdata; |
|
|
|
var newprofile = new TwisterProfile(thisAccount._name,Twister); |
|
|
|
if(cbfunc) cbfunc(newprofile); |
|
|
|
newprofile._data = newdata; |
|
|
|
|
|
|
|
if(cbfunc) cbfunc(newprofile); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},function(error){ |
|
|
|
},function(error){ |
|
|
|
thisAccount._handleError(error); |
|
|
|
thisAccount._handleError(error); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
},{errorfunc:function(error){ |
|
|
|
},{errorfunc:function(error){ |
|
|
|
|
|
|
|
|
|
|
@ -29879,6 +29878,8 @@ TwisterAccount.prototype.updateProfile = function (newdata,cbfunc) { |
|
|
|
|
|
|
|
|
|
|
|
thisAccount.updateProfileFields(newdata,cbfunc); |
|
|
|
thisAccount.updateProfileFields(newdata,cbfunc); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
thisAccount._handleError(error); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}}) |
|
|
|
}}) |
|
|
@ -29903,22 +29904,21 @@ TwisterAccount.prototype.updateProfileFields = function (newdata,cbfunc) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
thisAccount._dhtput( |
|
|
|
thisAccount._dhtput( |
|
|
|
thisAccount._name, |
|
|
|
thisAccount._name, |
|
|
|
"profile", |
|
|
|
"profile", |
|
|
|
"s", |
|
|
|
"s", |
|
|
|
olddata, |
|
|
|
olddata, |
|
|
|
profile._revisionNumber+1, |
|
|
|
profile._revisionNumber+1, |
|
|
|
function(result){ |
|
|
|
function(result){ |
|
|
|
|
|
|
|
|
|
|
|
var TwisterProfile = require("../TwisterProfile.js"); |
|
|
|
var newprofile = Twister.getUser(thisAccount._name)._profile; |
|
|
|
|
|
|
|
|
|
|
|
var newprofile = new TwisterProfile(thisAccount._name,Twister); |
|
|
|
|
|
|
|
newprofile._data = olddata; |
|
|
|
newprofile._data = olddata; |
|
|
|
if(cbfunc) cbfunc(newprofile); |
|
|
|
if(cbfunc) cbfunc(newprofile); |
|
|
|
|
|
|
|
|
|
|
|
},function(error){ |
|
|
|
},function(error){ |
|
|
|
thisAccount._handleError(error); |
|
|
|
thisAccount._handleError(error); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
},{errorfunc:function(error){ |
|
|
|
},{errorfunc:function(error){ |
|
|
|
|
|
|
|
|
|
|
@ -29930,6 +29930,8 @@ TwisterAccount.prototype.updateProfileFields = function (newdata,cbfunc) { |
|
|
|
|
|
|
|
|
|
|
|
thisAccount.updateProfileFields(newdata,cbfunc); |
|
|
|
thisAccount.updateProfileFields(newdata,cbfunc); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
thisAccount._handleError(error); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}}) |
|
|
|
}}) |
|
|
@ -29952,12 +29954,10 @@ TwisterAccount.prototype.updateAvatar = function (newdata,cbfunc) { |
|
|
|
avatar._revisionNumber+1, |
|
|
|
avatar._revisionNumber+1, |
|
|
|
function(result){ |
|
|
|
function(result){ |
|
|
|
|
|
|
|
|
|
|
|
var TwisterAvatar = require("../TwisterAvatar.js"); |
|
|
|
var newavatar = Twister.getUser(thisAccount._name)._avatar; |
|
|
|
|
|
|
|
newavatar._data = newdata; |
|
|
|
var newprofile = new TwisterAvatar(thisAccount._name,Twister); |
|
|
|
if(cbfunc) cbfunc(newavatar); |
|
|
|
newprofile._data = newdata; |
|
|
|
|
|
|
|
if(cbfunc) cbfunc(newprofile); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},function(error){ |
|
|
|
},function(error){ |
|
|
|
thisAccount._handleError(error); |
|
|
|
thisAccount._handleError(error); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -30342,7 +30342,7 @@ TwisterAccount.prototype._publishPostOnDht = function(v,cbfunc){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).call(this,require("buffer").Buffer) |
|
|
|
}).call(this,require("buffer").Buffer) |
|
|
|
},{"../TwisterAvatar.js":148,"../TwisterProfile.js":153,"../TwisterResource.js":157,"./TwisterContentParser.js":140,"./TwisterDirectMessages.js":141,"./TwisterPrivKey.js":142,"./TwisterTorrent.js":143,"bencode":1,"buffer":177,"inherits":52}],140:[function(require,module,exports){ |
|
|
|
},{"../TwisterResource.js":157,"./TwisterContentParser.js":140,"./TwisterDirectMessages.js":141,"./TwisterPrivKey.js":142,"./TwisterTorrent.js":143,"bencode":1,"buffer":177,"inherits":52}],140:[function(require,module,exports){ |
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
|
extractUsername: function(s) { |
|
|
|
extractUsername: function(s) { |
|
|
|
var username = ""; |
|
|
|
var username = ""; |
|
|
@ -32779,6 +32779,16 @@ TwisterAvatar.prototype.getUrl = function () { |
|
|
|
|
|
|
|
|
|
|
|
return this._data; |
|
|
|
return this._data; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @function |
|
|
|
|
|
|
|
* @name getUsername |
|
|
|
|
|
|
|
* @description return the username of the owner of the avatar |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
TwisterAvatar.prototype.getUsername = function () { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return this._name; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
},{"./TwisterAvatar.js":148,"./TwisterResource.js":157,"inherits":52}],149:[function(require,module,exports){ |
|
|
|
},{"./TwisterAvatar.js":148,"./TwisterResource.js":157,"inherits":52}],149:[function(require,module,exports){ |
|
|
|
var inherits = require('inherits'); |
|
|
|
var inherits = require('inherits'); |
|
|
|