Richard Hansen
e961718ff2
PadMessageHandler: Improve error logging
...
Use a log4js logger instead of `console`, and clean up some of the log
messages.
2021-11-20 01:24:30 -05:00
Richard Hansen
1447ab8899
PadMessageHandler: Factor out common USER_CHANGES error message formatting
2021-11-20 01:24:30 -05:00
Richard Hansen
35b2aeb3b1
PadMessageHandler: Factor out duplicate bad USER_CHANGES handling
...
This also fixes a double-count bug.
2021-11-20 01:24:30 -05:00
Richard Hansen
85919ff914
PadMessageHandler: Replace channels
package with async-friendly class
2021-11-20 01:24:30 -05:00
Richard Hansen
5c1177a3d9
PadMessageHandler: Switch from nodeify to util.callbackify
2021-11-20 01:24:30 -05:00
Richard Hansen
abf4eeeb17
ImportHtml: Wait for HTML processing to complete
2021-11-20 01:24:00 -05:00
Richard Hansen
50dce085c2
ImportHtml: In-line an unnecessary function
2021-11-20 01:24:00 -05:00
Richard Hansen
afdb01681a
ImportHtml: Reuse the HTML processor
2021-11-20 01:24:00 -05:00
Richard Hansen
db105e8650
ImportHtml: Get the logger once
2021-11-20 01:24:00 -05:00
Richard Hansen
24b22e3a6d
MinifyWorker: Fix buggy error handling in compressCSS
2021-11-19 02:47:17 -05:00
Richard Hansen
98f0e931fe
MinifyWorker: Promisify compressCSS
2021-11-19 02:47:17 -05:00
Richard Hansen
c94906f1f8
MinifyWorker: Delete unhelpful comment
...
The comment should have been a commit message instead.
2021-11-19 02:47:17 -05:00
Richard Hansen
ca5bdddc59
Changeset: Use break
instead of done
variable
2021-11-13 17:44:38 -05:00
Richard Hansen
44d99733c6
Changeset: Check .hasNext()
before calling .next()
2021-11-13 17:44:38 -05:00
Richard Hansen
1955e7b263
Changeset: Replace output params with return values
...
This improves readability and reduces the chances of introducing a
bug.
2021-11-13 17:44:38 -05:00
Richard Hansen
b29e59419e
Changeset: Factor out duplicate code
2021-11-13 17:44:38 -05:00
Richard Hansen
19e9c2f114
adminsettings: Pay attention to --settings
2021-11-12 23:45:05 -05:00
Richard Hansen
46ad93024d
adminsettings: Promisify
2021-11-12 23:45:05 -05:00
Richard Hansen
4e2f816665
adminsettings: Use object destructuring
2021-11-12 23:45:05 -05:00
Timon Engelke
b0a7237443
Fix comparison between CustomError and string
2021-11-12 23:40:20 +01:00
Richard Hansen
9f66ffbc3b
Pad: Delete no-op call to SmartOpAssembler.appendOpWithText()
2021-11-07 22:42:31 -05:00
Richard Hansen
caefd2184a
PadMessageHandler: Don't fire userLeave
if user hasn't joined yet
2021-11-07 01:30:39 -04:00
Richard Hansen
56cb08f4c5
pad: Pass color and display name in CLIENT_READY
2021-11-05 18:14:27 -04:00
Richard Hansen
fe87e2df87
ImportHandler: Pass the pad ID to the import
hook
...
This enables plugins to log the pad ID if desired.
2021-11-05 17:19:54 -04:00
Richard Hansen
caf4e9f28c
ImportHandler: Use truthiness to signal conversion handled
2021-11-05 17:19:54 -04:00
Richard Hansen
26675c5019
chat: New chatNewMessage
server-side hook
2021-11-01 01:54:29 -04:00
Richard Hansen
4c2f7f9a11
chat: Rename userId
to authorId
, userName
to displayName
2021-11-01 01:54:28 -04:00
Richard Hansen
0f47ca9046
chat: Plumb message object end to end
...
This will make it possible for future commits to add hooks that allow
plugins to augment chat messages with arbitrary metadata.
2021-11-01 01:54:28 -04:00
Richard Hansen
23037280a8
Pad: Simplify getChatMessages()
2021-11-01 01:54:28 -04:00
Richard Hansen
9aaf781548
PadMessageHandler: Modernize userLeave
hook context properties
2021-10-30 03:07:44 -04:00
Richard Hansen
a6d060d67b
PadMessageHandler: Replace clientReady
hook with new userJoin
hook
2021-10-30 03:07:44 -04:00
Richard Hansen
c98910e1c5
PadMessageHandler: Populate session info as early as possible
2021-10-30 03:07:44 -04:00
Richard Hansen
b7de24c85f
PadMessageHandler: Fix readability of duplicate user check
2021-10-30 03:07:44 -04:00
Richard Hansen
00e7b04518
PadMessageHandler: Improve readability of changeset loading
2021-10-30 03:07:44 -04:00
Richard Hansen
50b9e0df1f
PadMessageHandler: Use values from session info object
...
This is more consistent with the rest of the code, and it provides a
single source of truth.
2021-10-30 03:07:40 -04:00
Richard Hansen
10e930408c
PadMessageHandler: Delete unnecessary CLIENT_READY checks
...
The checks are already performed by the security manager.
2021-10-30 03:06:57 -04:00
Richard Hansen
0992f19570
PadMessageHandler: Improve readability of historical author fetch
2021-10-30 03:06:57 -04:00
Richard Hansen
d36a37d666
PadMessageHandler: Delete unnecessary protocolVersion
...
We can assume that the client code is always in sync with what the
server expects.
2021-10-30 03:06:57 -04:00
Richard Hansen
ce730b0493
PadMessageHandler: Inline createSessionInfoAuth()
...
This function is only used once so it doesn't need to be separate.
2021-10-30 03:06:57 -04:00
Richard Hansen
fa54dc1053
PadMessageHandler: Run the clientReady
hook asynchronously
2021-10-30 03:06:57 -04:00
Richard Hansen
5d30e0b1b2
PadMessageHandler: Run the userLeave
hook asynchronously
2021-10-30 03:06:57 -04:00
Richard Hansen
f2a118b311
PadMessageHandler: Inline unnecessary variables
...
Also delete some unneccessary comments.
2021-10-30 03:06:15 -04:00
Richard Hansen
7522d76c40
PadMessageHandler: Invert condition to improve readability
2021-10-30 03:03:19 -04:00
Richard Hansen
a3b4d985ac
lint: Fix awkward string formatting
2021-10-30 03:03:19 -04:00
Richard Hansen
5cbbcbcee6
pad: Simplify reload after .etherpad
import
...
The old "switch to pad" logic looked buggy, and it complicates pad
initialization. Forcing a refresh after importing an `.etherpad` file
isn't much of a UX downgrade.
2021-10-29 19:27:33 -04:00
webzwo0i
9bad1d03d3
importHtml: do not add an useless identity changeset
2021-10-29 02:29:45 -04:00
webzwo0i
f7f5e3dad8
setText: prevent adding useless revision in case the pad text did not
...
change
2021-10-29 02:29:45 -04:00
webzwo0i
668d62fa3f
importHtml: avoid race when applying empty document and the import changeset at the same time
2021-10-29 02:29:45 -04:00
Richard Hansen
428736cdc3
tests: easysync: Run with the frontend tests
2021-10-17 00:49:34 +02:00
Richard Hansen
3a5c44c8f7
/jserror: Enable colors to improve readability
2021-10-07 19:55:02 -04:00