ep_comments_page 0.1.95 → 0.1.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -29,7 +29,10 @@ exports.padCopy = async (hookName, context) => {
|
|
|
29
29
|
]);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
exports.handleMessageSecurity = async (hookName,
|
|
32
|
+
exports.handleMessageSecurity = async (hookName, ctx) => {
|
|
33
|
+
// ctx.client was renamed to ctx.socket in newer versions of Etherpad. Fall back to ctx.client in
|
|
34
|
+
// case this plugin is installed on an older version of Etherpad.
|
|
35
|
+
const {message, socket = ctx.client} = ctx;
|
|
33
36
|
const {type: mtype, data: {type: dtype, apool, changeset} = {}} = message;
|
|
34
37
|
if (mtype !== 'COLLABROOM') return;
|
|
35
38
|
if (dtype !== 'USER_CHANGES') return;
|
package/package.json
CHANGED