It should be the client's responsibility to handle null name or color.
In the case of author names, passing null to the client allows users
to fill in the names of other users (via a suggestUserName
CLIENT_MESSAGE).
When a new client opens a socket.io connection and sends a
CLIENT_READY message, Etherpad sends the new client a bunch of
USER_NEWINFO messages, one per other user already connected to the
pad. When iterating over the other users, filter out those without an
author ID or missing from the global authors database.
This makes the strings easier to read, and it simplifies `append()`.
Also fix some lint errors:
* Use `const` instead of `var`.
* Convert `append()` to an arrow function.
* Wrap long lines.
https://github.com/ether/etherpad-lite/pull/4516 was accidentally
squash-merged when it should have been rebased and merged (or regular
merged). This merge brings in the separate commits so that the changes
can be easily reviewed in the future.
eslint-config-etherpad 1.0.11 changed the comma-dangle rule to
prohibit trailing commas for function arguments. See:
673ab07acf
Re-run the automated fixes to apply the rule change.
This also fixes a few lint issues in changes that were made after
`eslint --fix` was originally run.
* lint: Bump eslint-config-etherpad to 1.0.11
* lint: Rerun `eslint --fix` to nuke trailing function call commas
eslint-config-etherpad 1.0.11 changed the comma-dangle rule to
prohibit trailing commas for function arguments. See:
673ab07acf
Re-run the automated fixes to apply the rule change.
This also fixes a few lint issues in changes that were made after
`eslint --fix` was originally run.
Normally I would let `eslint --fix` do this for me, but there's a bug
that causes:
const x = function ()
{
// ...
};
to become:
const x = ()
=> {
// ...
};
which ESLint thinks is a syntax error. (It probably is; I don't know
enough about the automatic semicolon insertion rules to be confident.)
Travis placed an unnecessary breaking restriction on our tests and failed to respond within 72 hours to our complaint. This has forced us to introduce Github Actions to manage our testing. This is hopefully a temporary measure while Travis either gets itself together or we find a non-Github requirement.
* Add commentary explaining why things are done the way they are.
* Delete steps that were added for debugging.
* Pass `--no-save` when installing `ep_etherpad-lite`.
* caching_middleware: fix gzip compression not triggered
* packages: If a client sets `Accept-Encoding: gzip`, the responseCache will
include `Content-Encoding: gzip` in all future responses, even
if a subsequent request does not set `Accept-Encoding` or another client
requests the file without setting `Accept-Encoding`.
Fix that.
* caching_middleware: use `test` instead of `match`
* add tests
* make code easier to understand
* make the regex more clear
* Avoid bashisms.
* Simplify `sed` of `settings.json`.
* Wrap long lines.
* Define and use the conventional log functions.
* Quote variable expansions.