Cryptpad: Zero Knowledge, Collaborative Real Time Editing
-
+
diff --git a/customize.dist/privacy.html b/customize.dist/privacy.html
index b152269da..a3969421a 100644
--- a/customize.dist/privacy.html
+++ b/customize.dist/privacy.html
@@ -3,7 +3,7 @@
Cryptpad: Zero Knowledge, Collaborative Real Time Editing
-
+
diff --git a/customize.dist/src/template.html b/customize.dist/src/template.html
index e696d42a5..c386ceee8 100644
--- a/customize.dist/src/template.html
+++ b/customize.dist/src/template.html
@@ -3,7 +3,7 @@
Cryptpad: Zero Knowledge, Collaborative Real Time Editing
-
+
diff --git a/customize.dist/terms.html b/customize.dist/terms.html
index b2c1d4916..3a78d46a2 100644
--- a/customize.dist/terms.html
+++ b/customize.dist/terms.html
@@ -3,7 +3,7 @@
Cryptpad: Zero Knowledge, Collaborative Real Time Editing
-
+
diff --git a/storage/README.md b/storage/README.md
index 7f406cf94..03117d95c 100644
--- a/storage/README.md
+++ b/storage/README.md
@@ -7,6 +7,8 @@ There are a few guidelines for creating a module:
Dependencies for your storage engine **should not** be added to Cryptpad.
Instead, write an adaptor, and place it in `cryptpad/storage/yourAdaptor.js`.
+Alternatively, storage adaptors can be published to npm, and required from your config (once installed).
+
## Your adaptor should conform to a simple API.
It must export an object with a single property, `create`, which is a function.
diff --git a/www/pad/main.js b/www/pad/main.js
index aa305c715..78b49fc8f 100644
--- a/www/pad/main.js
+++ b/www/pad/main.js
@@ -250,9 +250,16 @@ define([
};
var initializing = true;
- var userList = {}; // List of pretty name of all users (mapped with their server ID)
+ var userList = module.userList = {}; // List of pretty name of all users (mapped with their server ID)
var toolbarList; // List of users still connected to the channel (server IDs)
var addToUserList = function(data) {
+ var users = module.users;
+ if (users && users.length) {
+ for (var userKey in userList) {
+ if (users.indexOf(userKey) === -1) { delete userList[userKey]; }
+ }
+ }
+
for (var attrname in data) { userList[attrname] = data[attrname]; }
if(toolbarList && typeof toolbarList.onChange === "function") {
toolbarList.onChange(userList);
@@ -603,6 +610,7 @@ define([
//logging: true,
});
+ module.users = info.userList.users;
module.realtime = info.realtime;
var shjson = info.realtime.getUserDoc();