Commit Graph

124 Commits (64871c057b8f1060b846c2880fec6889221d7134)

Author SHA1 Message Date
Michael Telatynski f25e6813bb
Mandate use of js-sdk/src/matrix import over js-sdk/src (#7933) 2022-03-01 20:42:05 +00:00
Michael Telatynski 7fa01ffb06
Improve typing around event emitter handlers (#7816) 2022-02-22 12:18:08 +00:00
Michael Telatynski 8e4ced6454
Correctly handle Room.timeline events which have a nullable `Room` (#7635) 2022-01-26 13:24:14 +00:00
Michael Telatynski b6c2b5c995
Fix handling incoming redactions in EventIndex (#7443) 2022-01-04 09:39:07 +00:00
Aaron Raimist bdc56be863
Auto fix
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-10-22 17:23:37 -05:00
Dariusz Niemczyk 5290afcc4c Replace console.warn with logger.warn
Related https://github.com/vector-im/element-web/issues/18425
2021-10-18 14:08:23 +02:00
Dariusz Niemczyk 2d1d42b90e
Globally replace all console.logs via codemod (#6827)
This commit replaces all the `console.log` to `logger.log` via an automated script.
Related: vector-im/element-web#18425
2021-09-21 09:48:09 -06:00
Šimon Brandner f5cbc9f598
Fix pagination and improve typing
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-08-18 10:02:42 +02:00
Michael Telatynski 923d68a0fa Fix EventIndex handling events twice
It awaits the decryption in onRoomTimeline as well as subscribing to EVent.decrypted
2021-07-15 17:46:46 +01:00
Michael Telatynski bd175c6f40 Improve and consolidate typing 2021-07-10 15:43:46 +01:00
Michael Telatynski 88f691776f Use sleep from js-sdk as no point duplicating it 2021-07-01 22:55:27 +01:00
Michael Telatynski 5c6466d824 use better types 2021-07-01 10:01:48 +01:00
Michael Telatynski fcdb0a27d0 Convert EventTimeline, EventTimelineSet and TimelineWindow to TS 2021-07-01 09:53:54 +01:00
J. Ryan Stinnett ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Michael Telatynski be10e77704 Improve typing of Event Index Manager / Seshat 2021-06-19 15:37:06 +01:00
Michael Telatynski 02e72d8b04 Fix more type definitions 2021-06-17 14:24:53 +01:00
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
J. Ryan Stinnett 3b39007a5d Move initialisers to field 2021-04-26 14:06:25 +01:00
J. Ryan Stinnett d7e6f4b4b5 Add basic types 2021-04-23 17:05:50 +01:00
J. Ryan Stinnett 31a28b1a9e Update extensions for some files with types
This migrates one bucket of files using some amount of Flow typing to mark them
as TypeScript instead. The remaining type errors are fixed in subsequent
commits.
2021-04-23 16:05:30 +01:00
Germain Souquet 5104d7bed8 Improve error reporting when EventIndex fails on a supported environment 2021-03-24 11:51:39 +00: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
Damir Jelić 860b1b46e0 event-index: Use camel case for the user/device id. 2020-10-13 17:03:58 +02:00
Damir Jelić 5989a21dfb event-index: Pass the user/device id pair when initializing the event index. 2020-10-13 16:34:25 +02: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
Jorik Schellekens 22994bddf4
Update src/indexing/BaseEventIndexManager.ts
Co-authored-by: Travis Ralston <travpc@gmail.com>
2020-07-21 16:22:17 +01:00
Jorik Schellekens be5db851ca Revert unsafe rename and use boolean coercion 2020-07-21 10:29:05 +01:00
Jorik Schellekens 7699aafcaf Use new eslint package- fix lint issues in ts and js 2020-06-23 17:01:19 +01: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ć 9f9f24c624 BaseEventIndexManager: Add support to read/write user versions. 2020-06-17 17:12:13 +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