Request capabilities part 2

This commit is contained in:
yflory
2019-07-13 11:47:58 +02:00
parent 2ba6e40161
commit 60bea6b33b
8 changed files with 110 additions and 20 deletions

View File

@@ -941,7 +941,13 @@ define([
sframeChan.event('EV_WORKER_TIMEOUT');
});
sframeChan.on('EV_GIVE_ACCESS', function (data, cb) {
Cryptpad.padRpc.giveAccess(data, cb);
});
sframeChan.on('Q_REQUEST_ACCESS', function (data, cb) {
if (readOnly && hashes.editHash) {
return void cb({error: 'ALREADYKNOWN'});
}
Cryptpad.padRpc.requestAccess({
send: data,
channel: secret.channel