Richard Hansen
d94f380141
API: Fix race conditions in setText
, appendText
, restoreRevision
2021-12-14 01:02:00 -05:00
Richard Hansen
cff089e54e
PadMessageHandler: Accept retransmissions of USER_CHANGES
2021-12-14 01:02:00 -05:00
Richard Hansen
a370cfa5c6
Pad: Don't create no-op revisions
2021-12-14 01:02:00 -05:00
Richard Hansen
56b7671422
Pad: Return new rev number from appendRevision()
2021-12-14 01:02:00 -05:00
Richard Hansen
c05ee7ce72
PadMessageHandler: Move ACCEPT_COMMIT
after changeset save
2021-12-14 01:02:00 -05:00
Richard Hansen
4d457f6296
ImportHandler: Pass ImportError
to import
hook
2021-12-10 02:34:13 -05:00
John McLear
6cca27dea6
API: getText
with old revision should only return text, not atext
...
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-12-05 18:50:39 -05:00
Richard Hansen
8c857a85ac
pad: Use null
as default for userName
, userColor
options
...
These options are used as strings, so it doesn't make sense to default
them to a boolean value.
Note that this change has no effect due to a bug in how pad options
are processed; that bug will be fixed in a future commit.
2021-12-04 23:06:16 -05:00
Richard Hansen
61b608e264
pad: Use null
as default for lang
option
...
It doesn't make sense to override the browser's language with `en-gb`
by default.
Note that this change has no effect due to a bug in how pad options
are processed; that bug will be fixed in a future commit.
2021-12-04 23:06:16 -05:00
Richard Hansen
a02e45499d
Use the new AttributeMap and Changeset APIs
2021-11-28 23:47:27 -05:00
Richard Hansen
f00b1ae89b
Merge branch 'master' into develop
2021-11-28 23:10:45 -05:00
Richard Hansen
77bcb507b3
ImportEtherpad: Limit in-flight DB queries
2021-11-28 22:28:55 -05:00
Richard Hansen
5b3575acf0
ImportEtherpad: Use AttributePool to check attributes
2021-11-28 22:28:55 -05:00
Richard Hansen
19909eae53
ImportEtherpad: Rigorously check imported data
2021-11-28 22:28:55 -05:00
Richard Hansen
885ff3bcde
Pad: Move padLoad
hook invocation to PadManager.js
...
This puts global state change logic with the rest of the global state
management logic. This also makes it possible to create temporary Pad
objects without triggering plugin actions.
2021-11-28 22:28:55 -05:00
Richard Hansen
f7d4abdabe
Pad: Inject the database dependency
2021-11-28 22:28:55 -05:00
Richard Hansen
7c870f8a58
Pad: Add strict validation checks
2021-11-28 22:28:55 -05:00
Richard Hansen
ad78b24113
ImportEtherpad: Warn about unsupported attrib at encounter
2021-11-28 22:28:55 -05:00
Richard Hansen
23f8a12922
ImportEtherpad: Don't make any changes if data is bad
2021-11-28 22:28:55 -05:00
Richard Hansen
a2e77a7128
ImportEtherpad: Enforce single-pad records
2021-11-28 22:28:54 -05:00
Richard Hansen
33778281b9
ImportEtherpad: Simplify attribute key iteration
2021-11-28 22:28:54 -05:00
Richard Hansen
00fc7c8e86
ImportEtherpad: Reject unknown DB records
2021-11-28 22:27:44 -05:00
Richard Hansen
8e9bc8d325
ImportEtherpad: Avoid false positives when checking apool
2021-11-28 19:00:44 -05:00
Richard Hansen
003e5cbd4b
ImportEtherpad: Fix DB key pad ID transformation
2021-11-28 19:00:44 -05:00
Richard Hansen
fea7948b05
ImportEtherpad: Fix author info processing
2021-11-28 19:00:44 -05:00
Richard Hansen
777d045246
GroupManager: Clean up any mappings when deleting a group
2021-11-28 14:06:47 +00:00
Richard Hansen
5b37a56197
GroupManager: Use .setSub()
and parallel queries to avoid races
...
This also simplfies the code.
2021-11-27 22:20:03 -05:00
Richard Hansen
9d63700da0
SessionManager: Use .setSub()
and parallel queries to avoid races
...
This also simplfies the code.
2021-11-27 22:20:03 -05:00
Timon Engelke
3070cee9ca
Delete group after removing it from the group list
2021-11-27 22:20:03 -05:00
Timon Engelke
09c9e32d72
Delete session after corresponding group2session and author2session
2021-11-27 22:20:03 -05:00
Richard Hansen
2f0561abc0
ImportEtherpad: Remove unnecessary variable
2021-11-25 18:39:07 -05:00
Richard Hansen
9bc90128cb
ImportEtherpad: Fix async logic
2021-11-25 18:39:07 -05:00
Richard Hansen
d3427240c6
tests: Serve all of src/tests/frontend/
, not just specs
2021-11-23 21:07:07 -05:00
Richard Hansen
89fe40e080
Changeset: Migrate from OpIter
to deserializeOps()
2021-11-23 01:21:49 -05:00
Richard Hansen
657492e191
Changeset: Turn newOp()
into a real class
2021-11-23 01:21:12 -05:00
Richard Hansen
dab881139d
Pad: Fix copyPadWithoutHistory
apool corruption bug
2021-11-22 18:40:22 -05:00
Richard Hansen
d74dd235a4
Changeset: Replace appendATextToAssembler()
with a generator
2021-11-22 18:10:37 -05:00
Richard Hansen
2fc06a0884
Changeset: Add TODO comments for issues noticed
2021-11-21 04:11:41 -05:00
Richard Hansen
f1eb7a25a6
Changeset: Migrate to the new attribute API
2021-11-21 04:11:41 -05:00
Richard Hansen
1f227200da
Replace separate attrib key, value calls with single pair call
2021-11-21 04:11:41 -05:00
Richard Hansen
6cf2055199
Changeset: New API to simplify attribute processing
2021-11-21 04:11:41 -05:00
Richard Hansen
ae1741c25b
PadMessageHandler: Add missing parseNum()
for attribute lookup
2021-11-20 01:24:30 -05:00
Richard Hansen
a052580bd1
PadMessageHandler: Stop the USER_CHANGES timer on exception
2021-11-20 01:24:30 -05:00
Richard Hansen
97e382e5d2
PadMessageHandler: Move USER_CHANGES processing inside try
...
This improves the accuracy of the timing stats, and it simplifies
error handling.
2021-11-20 01:24:30 -05:00
Richard Hansen
b1c1501e1e
PadMessageHandler: Use object destructuring
2021-11-20 01:24:30 -05:00
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