Skip to content

Commit

Permalink
Merge pull request #7 from bigbluebutton/develop
Browse files Browse the repository at this point in the history
chore: update from develop
  • Loading branch information
pedrobmarin authored May 16, 2022
2 parents 0b5fda7 + 922bd1e commit 3eb45a5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
15 changes: 13 additions & 2 deletions lib/etherpad/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,21 @@ const validate = (method, params) => {
return true;
};

const getEntries = (params) => Object.entries(params).filter(entry => {
const [key, ] = entry;

return !DYNAMIC_PARAMS.includes(key);
});

const buildId = (method, params) => {
let id = method;
for (const [key, value] of Object.entries(params)) {
if (!DYNAMIC_PARAMS.includes(key)) {
const entries = getEntries(params);

if (entries.length === 0) {
// Avoid locking paramless calls
id += `&timestamp=${Date.now()}`;
} else {
for (const [key, value] of entries) {
id += `&${key}=${encodeURIComponent(value)}`;
}
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bbb-pads",
"version": "1.2.0",
"version": "1.2.1",
"description": "BigBlueButton's pads manager",
"scripts": {
"start": "node index.js",
Expand Down

0 comments on commit 3eb45a5

Please sign in to comment.