mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
can now reload in team drives
This commit is contained in:
parent
b7bf154c12
commit
9c73acabff
@ -656,10 +656,8 @@ define([
|
||||
var $sel = $div.find('.cp-usergrid-user.cp-selected');
|
||||
var sel = $sel.toArray();
|
||||
if (!sel.length) { return; }
|
||||
var curves = [];
|
||||
var toAdd = sel.map(function (el) {
|
||||
var curve = $(el).attr('data-curve');
|
||||
curves.push(curve);
|
||||
var teamId = $(el).attr('data-teamid');
|
||||
// If the pad is woned by a team, we can transfer ownership to ourselves
|
||||
if (curve === user.curvePublic && teamOwner) { return priv.edPublic; }
|
||||
@ -691,14 +689,24 @@ define([
|
||||
}, waitFor(function (err, res) {
|
||||
err = err || (res && res.error);
|
||||
redrawAll(true);
|
||||
curves.forEach(function(curve){
|
||||
common.mailbox.sendTo("ADD_TO_ACCESS_LIST", {
|
||||
channel: channel,
|
||||
}, {
|
||||
channel: friends[curve].notifications,
|
||||
curvePublic: friends[curve].curvePublic
|
||||
});
|
||||
});
|
||||
var $friends = $div.find('.cp-usergrid-user.cp-selected')
|
||||
$friends.each(function (i, el) {
|
||||
var curve = $(el).attr('data-curve');
|
||||
var ed = $(el).attr('data-ed');
|
||||
var friend = curve && friends[curve];
|
||||
var team = teamsData[ed];
|
||||
var mailbox = friend || team;
|
||||
if (mailbox) {
|
||||
if (friends[curve] && !mailbox.notifications) { return; }
|
||||
if (mailbox.notifications && mailbox.curvePublic) {
|
||||
common.mailbox.sendTo("ADD_TO_ACCESS_LIST", {
|
||||
channel: channel,
|
||||
}, {
|
||||
channel: mailbox.notifications,
|
||||
curvePublic: mailbox.curvePublic
|
||||
});
|
||||
}}
|
||||
})
|
||||
|
||||
if (err) {
|
||||
waitFor.abort();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user