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
Richard Hansen
629e7d5072
/jserror: Log all of the provided data
2021-10-07 19:55:01 -04:00
Richard Hansen
cb01ae8cbb
/jserror: Reject files
2021-10-07 19:55:01 -04:00
Richard Hansen
e909072776
/jserror: Refactor to handle errors better
2021-10-07 19:55:01 -04:00
Richard Hansen
a7c78768a1
ExportHelper: Simplify _analyzeLine()
a bit
2021-10-07 19:53:40 -04:00
Richard Hansen
d8cbd134d3
PadMessageHandler: Improve readability
2021-10-07 19:53:40 -04:00
Richard Hansen
019e296c4a
lint: Fix awkward string formatting
2021-10-07 19:53:40 -04:00
Richard Hansen
044f6543a5
lint: Fix ESLint errors (mostly camelcase warnings)
2021-10-07 19:53:40 -04:00
Richard Hansen
eb495e9ea2
Changeset: Move out obsolete code
2021-10-07 19:53:40 -04:00
Richard Hansen
e42e5457c1
LibreOffice: Improve logging
2021-10-01 03:01:24 -04:00
Richard Hansen
76374bc489
LibreOffice: Close stdin right away
...
This should prevent LibreOffice from hanging if it attempts to read
from stdin (it'll get EOF and probably exit with an error instead).
2021-10-01 03:01:24 -04:00
Richard Hansen
aec619cc0b
log4js: Deprecate the logconfig
setting
...
This will make it possible to upgrade log4js in a future version.
2021-09-28 04:30:26 -04:00
Richard Hansen
b3b6c94b76
log4js: Initialize as early as possible
2021-09-28 04:30:26 -04:00
Richard Hansen
7653dc650d
settings: Use a log4js logger instead of console
2021-09-28 04:30:26 -04:00
webzwo0i
dbd76f0c5d
export: Don't leak writeable pad ID when exporting
...
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-09-15 18:32:06 -04:00
webzwo0i
58bd96ce8f
padreadonly: Remove dead /ro/:id
handling
...
Read-only pads are accessed using `/p/` path since commit
ba3430ebb7
.
2021-09-14 17:07:55 -04:00
Richard Hansen
bc9cdd6957
SocketIORouter: Add acknowledgement support
2021-09-06 14:45:26 -04:00
Richard Hansen
9f9adb369b
SocketIORouter: Don't crash if message handler throws
2021-09-06 14:45:26 -04:00
Richard Hansen
94f71bd5e9
SocketIORouter: Add ability to unregister handler
...
This will make it easier to add tests.
2021-09-06 14:45:26 -04:00
Richard Hansen
2e93fca699
SocketIORouter: Logging improvements
2021-09-06 14:45:26 -04:00
Richard Hansen
b9609a749d
SocketIORouter: Rename variables to improve readability
2021-09-06 14:45:26 -04:00
Richard Hansen
7dbd278d1d
deps: Bump js-cookie to 3.0.0
2021-08-29 23:36:48 -04:00
Richard Hansen
118c66e5d0
HTML import: Improve log message for invalid HTML
2021-08-12 13:53:23 -04:00
Richard Hansen
c816c20bc7
HTML import: Replace cheerio with jsdom to simplify contentcollector
...
Cheerio provides jQuery-like objects but they wrap DOM Node-like
objects that are not 100% API compatible with the DOM spec. Because of
this, contentcollector, which is used in browsers and in Node.js
during HTML import, has until now needed to support two different
APIs. This commit modifies HTML import to use jsdom instead of cheerio
and simplifies contentcollector.
2021-08-12 13:53:23 -04:00
Richard Hansen
c83bb058d1
PadMessageHandler: Fix stats null dereference
...
It is possible for the stats to be read before the
`expressCreateServer` hook is called (in particular: when there is an
error during startup), which is when the `socketio` variable is set.
Check for non-null `socketio` before attempting to count the number of
socket.io connections.
2021-07-22 13:07:03 -04:00