Teams: setPadAttribute and getPadAttribute

This commit is contained in:
yflory
2019-09-05 18:25:14 +02:00
parent 4c339afc6c
commit 35a429d30c
3 changed files with 50 additions and 13 deletions

View File

@@ -736,11 +736,15 @@ define([
// We're going to return the value with the most recent atime. The attributes may have been
// updated in a shared folder by another user, so the most recent one is more likely to be the
// correct one.
// NOTE: we also return the atime, so that we can also check with each team manager
var getPadAttribute = function (Env, data, cb) {
cb = cb || function () {};
var sfId = Env.user.userObject.getSFIdFromHref(data.href);
if (sfId) {
return void cb(null, Env.user.proxy[UserObject.SHARED_FOLDERS][sfId][data.attr]);
setTimeout(function () {
cb(null, Env.user.proxy[UserObject.SHARED_FOLDERS][sfId][data.attr]);
});
return;
}
var datas = findHref(Env, data.href);
var res = {};
@@ -753,7 +757,9 @@ define([
res.value = value;
}
});
cb(null, res.value);
setTimeout(function () {
cb(null, res);
});
};
var getTagsList = function (Env) {