Commit Graph

110 Commits (e685f1239d6bdc588d7d244119d9a9361a756111)

Author SHA1 Message Date
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
Damir Jelić 0e5fec5feb EventIndex: Catch errors when removing a crawler checkpoint. 2020-01-31 18:46:45 +01:00
Damir Jelić 5cabfb63a4 EventIndex: Don't mark the event listener method docs as jsdoc comments. 2020-01-28 16:13:56 +01:00
Damir Jelić 948ec203c6 BaseEventIndexManager: Fix the type hints for the empty promises. 2020-01-28 15:07:29 +01:00
Damir Jelić 0b7f23fa54 EventIndex: Improve the documentation a bit. 2020-01-28 15:06:43 +01:00
Damir Jelić e2dd2bd950 Merge branch 'poljar/seshat-ui-pr' into develop 2020-01-27 17:18:17 +01:00
Damir Jelić 37f289b120 EventIndex: Add docstrings for the FilePanel methods. 2020-01-24 14:24:25 +01:00
Damir Jelić ecfecfe559 EventIndex: Fix a small style issue. 2020-01-24 12:07:03 +01:00
Damir Jelić 0c3d507455 EventIndex: Cancel the crawler early after a message request.
If we're cancelling the crawler nowadays this means that we're likely
deleting the index. Processing these messages is wasted effort in that
case so break early.
2020-01-24 11:46:46 +01:00
Damir Jelić 38b1663755 EventIndex: Subclass the event emitter instead of putting one in a property. 2020-01-24 11:28:33 +01:00
Damir Jelić 825b6f7b7d EventIndexPeg: Style fix for a docstring. 2020-01-24 11:16:49 +01:00
Damir Jelić d9e933c915 EventIndex: Style fixes for the docstrings. 2020-01-24 11:15:57 +01:00
Damir Jelić 381fe95f67 EventIndex: Fix some lint errors. 2020-01-23 15:22:26 +01:00
Damir Jelić 947ea9823d Settings: Remove the crawler sleep time setting. 2020-01-23 13:32:27 +01:00
Damir Jelić 0d545ed335 EventIndexPeg: Small refactor and change the init logic.
This changes the way the event index is initialized, if it's disabled in
the settings it will not be initialized at all, before only the crawler
loop was not being started.
2020-01-23 12:23:23 +01:00
Damir Jelić 5fd121d2af ManageEventIndex: Remove the unused stats. 2020-01-23 11:44:56 +01:00
Damir Jelić 4627e3b282 EventIndex: Refactor out the addInitialCheckpoints method. 2020-01-23 11:02:44 +01:00
Damir Jelić 735ba4fd33 EventIndex: Correctly populate events on initial fill requests. 2020-01-22 16:11:54 +01:00
Damir Jelić a2892f5b02 EventIndex: Fix some lint issues. 2020-01-21 16:40:32 +01:00
Damir Jelić a0599dedf0 EventIndex: Use the newly exposed TimelineWindow methods. 2020-01-21 15:45:29 +01:00
Damir Jelić 8de149704e EventIndexPanel: Dynamically update the indexer stats. 2020-01-20 17:43:55 +01:00
Damir Jelić 1b9b30d4ea EventIndexPanel: Get more stats for our indexer, not just the size. 2020-01-20 17:42:24 +01:00
Damir Jelić 4cf44cf5a5 EventIndex/FilePanel: Allow longer lines. 2020-01-20 12:43:20 +01:00
Damir Jelić 0b4b9d8d5d EventIndex: Simplify the json event getting logic. 2020-01-20 12:42:46 +01:00
Damir Jelić b4c8a686ce EventIndex: Don't import the whole js-sdk. 2020-01-20 12:41:55 +01:00
Damir Jelić 3c46a56391 EventIndex: Fix some lint errors. 2020-01-17 14:22:22 +01:00
Damir Jelić 928bb69b11 EventIndexPeg: Add a helper method to easily start the crawler. 2020-01-17 14:22:22 +01:00
Damir Jelić 4fe7752f3c EventIndex: Add a method to gather the currently crawled rooms. 2020-01-17 14:22:22 +01:00
Damir Jelić 0132c3bbe3 EventIndex: Start the crawler only if it's configured to start. 2020-01-17 14:22:22 +01:00
Damir Jelić 47156351a6 EventIndex: Use a setting for the crawler sleep time. 2020-01-17 14:22:22 +01:00
Damir Jelić b7b66cfd9a EventIndex: Use the sleep method from our utils. 2020-01-17 14:21:25 +01:00
Damir Jelić f324f676d3 EventIndex: Add a method to get the current disk usage of the index. 2020-01-17 14:20:54 +01:00
Damir Jelić ccfe3c7e70 FilePanel/EventIndex: Fix lint errors. 2020-01-17 11:52:20 +01:00
Damir Jelić 95b86b42d0 BaseEventIndexManager: Update the docs for the loadFileEvents method. 2020-01-17 11:06:05 +01:00
Damir Jelić 70d394e668 EventIndex: Update the imports for the new build system. 2020-01-17 10:58:31 +01:00
Damir Jelić 49c1dbe421 FilePanel: Implement pagination requesting using the EventIndex. 2020-01-17 10:11:21 +01:00
Damir Jelić 8a17c73b79 EventIndex: Add a method to populate an event timeline with file events. 2020-01-17 10:10:21 +01:00
Damir Jelić 263370c9ae BaseEventIndexManager: Add a method to load file events of a room. 2020-01-17 10:10:21 +01:00
Damir Jelić 4f63b10465 EventIndex: Live events can be unencrypted as well. 2020-01-17 10:10:21 +01:00
Travis Ralston 59f608ffd6
Merge pull request #3761 from matrix-org/travis/babel7-wp-es6-export
Convert CommonJS exports to ES6 exports
2020-01-08 09:09:11 -07:00
Travis Ralston 042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Travis Ralston 344dac4fb9 Convert CommonJS exports to ES6-compatible exports
We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
2019-12-22 21:01:02 -07:00
Damir Jelić 21a15fdcb4 EventIndex: Move the checkpoint loading logic into the init method.
The checkpoints don't seem to be loaded anymore in the onSync method,
the reason why this has stopped working is left unexplored since loading
the checkpoints makes most sense during the initialization step anyways.
2019-11-25 18:11:50 +01:00
Damir Jelić 4bd46f9d69 EventIndex: Silence the linter complaining about missing docs. 2019-11-20 12:47:20 +01:00
Damir Jelić 2f5b0a9652 EventIndex: Use property initializer style for the bound callbacks. 2019-11-20 12:30:03 +01:00
Damir Jelić e9df973c82 EventIndex: Move the event indexing files into a separate folder. 2019-11-19 14:05:00 +01:00