From 182d684fc48e930a5ff7de7f0f85b008aa89e88f Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 17 Dec 2020 11:57:53 +0100 Subject: [PATCH] Add a command to fix roster rights --- www/common/cryptpad-common.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 46f569a3e..1a65fa551 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -148,6 +148,22 @@ define([ }; send(); }; + common.fixRosterHash = function () { + // Push teams keys + postMessage("GET", { + key: ['teams'], + }, function (obj) { + if (obj.error) { return console.error(obj.error); } + Object.keys(obj || {}).forEach(function (id) { + postMessage("SET", { + key: ['teams', id, 'keys', 'roster', 'lastKnownHash'], + value: '' + }, function () { + console.log('done, please close all your CryptPad tabs before testing the fix'); + }); + }); + }); + }; (function () { var bypassHashChange = function (key) {