Commit graph

285 commits

Author SHA1 Message Date
Bruno Windels
4838e19c92
Merge pull request #811 from vector-im/bwindels/sharekeyswithinvitees
Key sharing based on room history visibility
2022-07-29 14:23:26 +00:00
Half-Shot
5b5c852401 Revert "use logging items"
This reverts commit d937b9b14b.
2022-07-29 10:44:37 +01:00
Half-Shot
d937b9b14b use logging items 2022-07-29 10:39:41 +01:00
Bruno Windels
f337940202 this migration shouldn't be needed anymore
and undoes the export of addRoomToIdentity, which is somewhat internal
2022-07-22 17:46:29 +02:00
Will Hunt
a85d2c96d6
Log the error when we can't get storage access
This is quite useful when debugging why a session isn't working properly.
2022-07-06 10:06:00 +01:00
Bruno Windels
74c640f937 convert Session 2022-02-15 18:21:12 +01:00
Bruno Windels
2e3616e05d call cursor.update during backup field migration, needs new version 2022-02-01 12:31:10 +01:00
Bruno Windels
b29ecd339d add more logging to backup storage migration 2022-02-01 12:18:28 +01:00
Bruno Windels
ae5cc17290 mark all inbound sessions to be backed up again when changing version 2022-01-31 14:36:04 +01:00
Bruno Windels
eabd303c8e count on the index if we're using one, don't always take the store 2022-01-28 15:14:58 +01:00
Bruno Windels
eb134a6c47 only take into account non-backed up keys for counting 2022-01-28 13:18:03 +01:00
Bruno Windels
b30db544a3 use idb key range to select non-backed up keys 2022-01-28 13:11:32 +01:00
Bruno Windels
a499689bd8 also write room key that we create ourselves with RoomKey infrastructure
so all keys are written in one place and the flags are always correct
2022-01-28 13:10:48 +01:00
Bruno Windels
c81dde53e7 store key source in inbound session 2022-01-28 10:03:30 +01:00
Bruno Windels
48e72f9b69 replace SessionsNeedingBackup store with backup field on inbound session 2022-01-27 16:00:46 +01:00
Bruno Windels
e80acd4d57 add migration when backup is enabled 2022-01-26 16:30:40 +01:00
Bruno Windels
60ed276b8a add progress notification and cancellation to key backup flush 2022-01-26 15:19:31 +01:00
Bruno Windels
524090e27d support idb store/index.count 2022-01-26 15:12:11 +01:00
Bruno Windels
86caa5f9b1 rename session backup to key backup to be consistent with RoomKey 2022-01-26 09:51:48 +01:00
Bruno Windels
290aaad63a add sessionsNeedingBackup store 2022-01-25 18:47:27 +01:00
Bruno Windels
5d87d8bde3 change store.get return type when no value is found to undefined
IDBRequest.result is undefined according to the official TS type decls.
2022-01-25 18:43:44 +01:00
Bruno Windels
1a618dd106 only import fake-indexeddb in tests
as it is a devDependency and can end up in the legacy bundle
under circumstances
2021-12-01 17:25:07 +01:00
RMidhunSuresh
4ce7634201 Convert error.js to ts 2021-11-17 20:28:44 +05:30
Bruno Windels
695996d6e2 add ILogger and ILogExport interface, to give export correct return type
also move logging related types to own file
2021-11-17 11:39:12 +01:00
RMidhunSuresh
14eaa57434 No need for type assertion here 2021-11-16 13:14:11 +05:30
RMidhunSuresh
7097ba07d1 Replace LogLabelOrNull type with undefined 2021-11-15 18:59:33 +05:30
RMidhunSuresh
30a384fe1e Make LogFilter optional 2021-11-15 18:44:25 +05:30
RMidhunSuresh
520e0f1b89 Use interface ILogItem 2021-11-15 17:29:08 +05:30
RMidhunSuresh
a7d059b3ed Fix imports 2021-11-14 19:42:18 +05:30
RMidhunSuresh
29a8260514 Add explicit types for return in methods 2021-11-12 23:12:15 +05:30
Bruno Windels
cbf82fcd29 cleanup code so far 2021-10-20 15:14:17 +02:00
Bruno Windels
d7407ecf66 WIP 2021-10-20 11:39:01 +02:00
Bruno Windels
89add8b684 fix sssskey not being migrated properly 2021-09-30 10:18:03 +02:00
Bruno Windels
d10d27c1d6 clear relations for room when forgetting room 2021-09-30 09:49:45 +02:00
Bruno Windels
4cebe26186
Merge pull request #523 from vector-im/bwindels/clear-cache-after-515
clear history cache to purge potential timeline corruption from #515
2021-09-30 09:41:24 +02:00
Bruno Windels
42f1603d81 use correct prefix to remove local storage value 2021-09-30 09:25:35 +02:00
Bruno Windels
ccda93cc82 remove leftover logging 2021-09-30 08:40:49 +02:00
Bruno Windels
3556878a1e clear history cache to purge potential timeline corruption from #515 2021-09-30 08:37:33 +02:00
Bruno Windels
a1c66738db migration to initialize & restore e2ee identity backup 2021-09-29 19:39:26 +02:00
Bruno Windels
3a064d6796 a IDBRequest when opening the database does not have a source 2021-09-29 19:21:42 +02:00
Bruno Windels
2ef7251079 move ssssKey to e2ee prefix as well so it gets backed up too 2021-09-29 19:21:06 +02:00
Bruno Windels
77bd0d3f3c store e2ee session values as well in localStorage 2021-09-29 11:49:58 +02:00
Bruno Windels
e31d3abc97 fix ts errors in TimelineEventStore unit tests 2021-09-28 14:20:54 +02:00
Bruno Windels
ec2f1b9833 add unit tests for findExistingKeys 2021-09-28 14:20:21 +02:00
Bruno Windels
edc3a1d33c convert storage mock to TS and add utility for mock raw database 2021-09-28 14:19:59 +02:00
Bruno Windels
9036b21b5c don't interpret hex as decimal when decoding the key
this fixes #515 as it was causing the gap not to be closed,
because the fragment id was never equal.
2021-09-28 11:34:55 +02:00
Bruno Windels
f55f450850 fix findExistingKeys too many (existing but not requested) keys 2021-09-27 16:27:52 +02:00
Bruno Windels
b75e2fe0ce decode straight to EventKey object 2021-09-24 15:40:33 +02:00
Bruno Windels
e6f7f213ec don't (re)link fragments in fill, close gap if overlap w linked fragment 2021-09-23 18:02:05 +02:00
Bruno Windels
45917eae1d
Merge pull request #494 from vector-im/DanilaFe/backfill-changes
Unit tests for GapWriter, using a new timeline mock utility
2021-09-23 10:15:37 +02:00