Michael Telatynski
9315a87ebf
Convert EventIndex to Typescript
2021-06-07 10:57:11 +01:00
Travis Ralston
5b2dacd99e
Adapt for js-sdk MatrixClient conversion to TS
...
For https://github.com/matrix-org/matrix-js-sdk/pull/1718
2021-06-01 21:36:28 -06:00
Germain Souquet
f9f10de0da
use renamed decrypt event method
2021-05-18 13:01:38 +01:00
Germain Souquet
1cfd4b6e1a
Use client.decryptEvent to avoid accessing js-sdk private members
2021-05-18 11:41:20 +01:00
Germain Souquet
871c48f69b
stop assuming that decryption happens ahead of time
2021-05-18 10:02:21 +01:00
Germain Souquet
da1df70557
Improve comments and explainer for new decryption approach
2021-05-11 10:18:53 +01:00
Germain Souquet
c96f11db7d
appease linter
2021-05-10 17:22:33 +01:00
Germain Souquet
d0d2907a07
Decrypt events ahead of storing them in the index
2021-05-10 15:19:46 +01:00
Šimon Brandner
232b87a3b4
Improve formatting
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-29 19:57:02 +02:00
Šimon Brandner
46bfbbadf9
Enable indent rule and fix indent
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-27 17:23:27 +02:00
Travis Ralston
1d9d0cd7be
Convert a bunch more js-sdk imports to absolute paths
...
Turns out a lot of the typescript warnings about improper warnings were correct. TypeScript appears to be pulling in two copies of the js-sdk when we do this, which can lead to type conflicts (or worse: the wrong code entirely). We fix this at the webpack level by explicitly importing from `src`, but some alternative build structures have broken tests because of this - jest ends up pulling in the "wrong" js-sdk, breaking things.
2021-03-18 20:50:34 -06:00
J. Ryan Stinnett
ce226ab534
Replace Riot with Element in docs and comments
...
This only covers the simple cases of references to issues and repos. More
complex areas, such as deployment scripts, will be handled separately.
Part of https://github.com/vector-im/element-web/issues/14864
2020-08-03 18:33:36 +01:00
Travis Ralston
1f7f40736b
Fix imports for SettingLevel to point at new file
2020-07-28 11:53:43 -06:00
Damir Jelić
e3ae05b6b9
Merge branch 'poljar/eventindex-user-version' into develop
2020-06-19 09:50:40 +02:00
Damir Jelić
253212d8c8
Merge remote-tracking branch 'origin/poljar/eventindex-new-encrypted-rooom' into develop
2020-06-19 09:50:22 +02:00
Damir Jelić
2aa00cbf41
EventIndex: Bump our user version and delete the db if it's an old db.
2020-06-17 17:13:25 +02:00
Damir Jelić
5c42294336
EventIndex: Store and restore the encryption info for encrypted events.
2020-06-09 15:26:34 +02:00
Damir Jelić
2c81d3eda8
EventIndex: Use the correct variable to get the room id.
2020-06-08 17:30:26 +02:00
Damir Jelić
7a2bb4b112
EventIndex: Check if a newly encrypted room is indexed before adding a checkpoint.
2020-06-08 16:43:20 +02:00
Damir Jelić
ea35fc2881
EventIndex: Fix some lint issues.
2020-06-08 15:14:14 +02:00
Damir Jelić
f802668fff
EventIndex: Add a missing await.
2020-06-08 15:14:14 +02:00
Damir Jelić
39bcd8d56d
EventIndex: Add a checkpoint if a room turns into a encrypted one.
2020-06-08 15:14:13 +02:00
poljar
6c10cbc903
EventIndex: Use a warning when redactions don't have an event id.
...
Co-authored-by: Travis Ralston <travpc@gmail.com>
2020-05-26 21:48:10 +02:00
Damir Jelić
58f0814530
EventIndex: Handle invalid m.room.redaction events correctly.
...
Clients might send invalid redaction events, such events will not have a
valid redacts field containing the event id of the associated event that
was redacted.
Skip such events instead of ending up looping over the checkpoint
forever.
2020-05-26 21:27:45 +02:00
Damir Jelić
403a64bcc6
EventIndex: Print out the checkpoint if there was an error during a crawl.
2020-05-26 20:48:22 +02:00
Damir Jelić
db72c645ba
EventIndex: Add a missing semicolon.
2020-05-20 11:14:37 +02:00
Damir Jelić
86ad6de41e
EventIndex: Handle null tokens in the crawler loop as well.
...
This is similar to 5eb510387c
. But now the
checkpoint arrived during a crawl.
2020-05-20 11:06:52 +02:00
Damir Jelić
c9ac726629
EventIndex: Remove an unused variable.
2020-05-05 10:21:18 +02:00
Damir Jelić
f2df698e3b
EventIndex: Reduce the logging the event index is producing.
2020-05-05 10:10:21 +02:00
Damir Jelić
3781bdc975
EventIndex: Add a missing semicolon.
2020-04-20 10:10:16 +02:00
Damir Jelić
6084c08f34
EventIndex: Filter out events that don't have a propper content value.
2020-04-20 10:05:04 +02:00
Bruno Windels
8c2c777e2b
disable reemitting on the client for events mapped from the indexer
2020-04-15 17:37:32 +02:00
Damir Jelić
c6fcaf86ff
EventIndex: Log if we had all events in a checkpoint but are continuing.
2020-04-08 11:15:13 +02:00
Damir Jelić
bec061239a
EventIndex: Mark the initial checkpoints for a full crawl.
...
The logic determining if a batch of events is already in the database
has been reported to be faulty. Since we know that when we add initial
checkpoints they need to go to the start of the timeline we can mark
them to do a full crawl which will skip the test if the events are
already in the database.
This is a quick fix for this and checkpoints that are added after a gap
in the timeline might incorrectly conclude the same resulting in missing
events if there was a gap and the issue is triggered.
2020-04-01 15:17:59 +02:00
Damir Jelić
836b348bff
EventIndex: Add a trailing comma.
2020-03-30 14:49:28 +02:00
Damir Jelić
4371006c58
EventIndex: Better logging on how many events are added.
...
This adds a bit more info to how many events are added, how many skipped
and if they are skipped because they are undecryptable.
2020-03-30 14:49:28 +02:00
Damir Jelić
3185d6baf5
EventIndex: Add some logging to the file panel populating.
2020-03-20 13:58:29 +01:00
Damir Jelić
997a179e69
Merge branch 'poljar/shutdown' into develop
2020-03-17 10:15:12 +01:00
Damir Jelić
029624cbec
Merge branch 'poljar/delete-events' into develop
2020-03-17 10:15:05 +01:00
Damir Jelić
cb368a0601
EventIndex: Remove a checkpoint if the HTTP request returns a 403.
...
This fixes https://github.com/vector-im/riot-web/issues/12722 .
2020-03-13 14:13:33 +01:00
Damir Jelić
a612a66b69
EventIndex: Properly await the index closing.
2020-03-13 11:33:58 +01:00
Damir Jelić
25568fa15c
EventIndex: More lint fixes.
2020-03-12 12:20:46 +01:00
Damir Jelić
c02e839e9d
EventIndex: Use a const instead of a let binding.
2020-03-12 12:15:46 +01:00
Damir Jelić
cd515f1922
EventIndex: Add support to delete events from the index.
2020-03-12 12:01:50 +01:00
Damir Jelić
7f71e551da
EventIndex: Split out the statements that check for a valid event type.
2020-02-19 14:50:59 +01:00
Damir Jelić
156c6b8db8
EventIndex: Document the return value of the isValidEvent method.
2020-02-19 14:50:59 +01:00
Damir Jelić
59f8b4f6b1
EventIndex: Don't index key verification events.
...
Since cross-signing is a thing key verification events have become part
of the timeline and room history.
Those events are m.room.message events for backwards compatibility, so
clients that don't support key verification in the timeline print out a
fall-back message.
2020-02-19 14:50:59 +01:00
Damir Jelić
75fe3c2219
ManageEventIndexDialog: Show how many rooms are being currently crawled.
2020-02-01 12:01:53 +01:00
Damir Jelić
01c1c2364b
ManageEventIndexDialog: Add back a control for the crawler sleep time.
2020-01-31 18:46:45 +01:00
Damir Jelić
5eb510387c
EventIndex: Don't process checkpoints that don't have a valid token.
...
Some rooms might have null as a token, don't add those to be crawled nor
to the index.
Catch any other errors that might occur during the addition of an
initial checkpoint and log them.
2020-01-31 18:46:45 +01:00