Commit graph

75 commits

Author SHA1 Message Date
Bruno Windels
a23df8a545 pass history visibility to device tracker
and delegate adding and removing members to share keys with to it
2022-07-22 17:49:59 +02:00
Bruno Windels
c8a8eb10b5 get user ids for sharing a new key when the message is sent
rather than when the key happens to get sent
2022-07-20 15:21:33 +02:00
Bruno Windels
d79e5f7806 create key share operations for invitees when history visibility=invited 2022-07-20 15:20:23 +02:00
Bruno Windels
c47bdd5715 flush key backup when creating a new room key 2022-01-28 13:14: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
ffece4f357 move some validation of into session backup 2022-01-25 18:48:03 +01:00
RMidhunSuresh
88ec1b575d Convert mergeMap.js to ts 2021-11-17 20:28:44 +05:30
Bruno Windels
44a26fd340 key backup: add disable button,and enabling add dehydrated device option 2021-10-29 15:48:28 +02:00
Bruno Windels
66a93ee108 adapt Session and RoomEncryption to megolm/Decryption API changes 2021-10-22 17:48:53 +02:00
Bruno Windels
77d10c93d6 convert groupby and megolm decryption utils to typescript 2021-10-21 14:40:51 +02:00
Bruno Windels
f16c08f13e remove room from all user identities when leaving
and delete identity as well as all device identities if no rooms left
2021-05-06 15:24:52 +02:00
Bruno Windels
a12f10dc3c make type explicit 2021-05-06 15:23:33 +02:00
Bruno Windels
e17fb24bd8 also await sharing the key in encrypt 2021-04-09 10:37:55 +02:00
Bruno Windels
13f20cdd26 wait for running key share operation in encrypt 2021-04-09 10:37:43 +02:00
Bruno Windels
d88720a18f don't start key backup operation if not enabled 2021-03-15 16:54:43 +01:00
Bruno Windels
8684d6b5e5 some fixes 2021-03-15 15:23:35 +01:00
Bruno Windels
fcc06b2754 WIP to add logging to decryption and fetching key backups 2021-03-15 14:39:42 +01:00
Bruno Windels
f2dc7728a5 notifyRoomKey was a better name 2021-03-15 14:36:38 +01:00
Bruno Windels
96f060c0a9 also retry decryption for backfilled entries
as their event ids won't be stored along the missing key (we only store
synced items so we don't fill up the missing event ids in the store
with undecryptable backfilled event ids)
2021-03-15 14:33:14 +01:00
Bruno Windels
4b62e0a2ce extract retry event ids for key before overwriting key on key backup 2021-03-15 13:38:27 +01:00
Bruno Windels
30b056af1c let devices know we can't claim their OTKs 2021-03-08 16:19:46 +01:00
Bruno Windels
e0d14207ac make opening a txn async again
as we'll need to await a bogus request first thing after opening the txn

funny enough, we originally made it sync to accommodate the same bug
in safari, but that didn't prevent any microtask being awaited
before scheduling a request in the calling code closing the txn.

We'll await a bogus request within the transaction class now so it
doesn't depend on the calling code
2021-03-04 19:47:02 +01:00
Bruno Windels
4445b1ee01 store key share operations before tracking the room 2021-03-03 18:56:16 +01:00
Bruno Windels
e7598b9c76 only request key backup for events that are UTD 2021-03-03 14:03:50 +01:00
Bruno Windels
30481a5a9e add logging to key sharing and discarding in reaction to member changes 2021-03-03 14:03:50 +01:00
Bruno Windels
f3c49e51f2 add, don't replace timeline retry entries
also, filter out any that have been decrypted already
2021-03-03 14:03:50 +01:00
Bruno Windels
56db210763 attempt at fixing https://github.com/vector-im/hydrogen-web/issues/245 2021-03-03 14:03:50 +01:00
Bruno Windels
e29bc6710a bring back missing import 2021-03-03 14:03:50 +01:00
Bruno Windels
c6db23bcfb WIP to store missing session event ids 2021-03-03 14:03:50 +01:00
Bruno Windels
3fa2d22015 remove isTimelineOpen flag and rather do the check to verify in Room
flags are ugly, let's avoid them where we can
2021-03-03 14:03:50 +01:00
Bruno Windels
8d080163b3 reattempt decryption for timeline items 2021-03-02 19:39:04 +01:00
Bruno Windels
fb446167f6 make new sync room keys available during decryption of same sync 2021-03-02 19:39:04 +01:00
Bruno Windels
dd38fc13d7 log sending messages 2021-02-23 19:22:59 +01:00
Bruno Windels
f321968ac3 add more sync logging 2021-02-18 12:44:19 +01:00
Bruno Windels
769feac73c cleanup 2020-11-10 14:02:27 +01:00
Bruno Windels
bd5771e449 remove obsolete comment 2020-11-09 17:22:37 +01:00
Bruno Windels
6572377832 move tracking the room to where we need the devices 2020-11-09 16:50:39 +01:00
Bruno Windels
9cfb3c8e95 only check to pre-share new megolm session every minute 2020-11-09 16:50:05 +01:00
Bruno Windels
44a2febce9 hook it up 2020-11-06 23:43:02 +01:00
Bruno Windels
c6ff4c2517 finish room encryption part 2020-11-06 18:56:32 +01:00
Bruno Windels
5d12aef6db support pre-sharing room keys in room encryption 2020-11-06 10:32:37 +01:00
Bruno Windels
8122d76e73 Merge branch 'master' into bwindels/url-routing 2020-10-14 12:45:49 +02:00
Bruno Windels
07701117cd reduce megolm sync cache size to 1 session
as this is kept around for every e2ee room, and we only have
limited olm memory
2020-10-14 12:43:35 +02:00
Bruno Windels
b29b776e9f fix olm session cache being leaked when closing session 2020-10-14 11:25:49 +02:00
Bruno Windels
c8e4dbc1b3 this should be a map 2020-10-05 17:06:29 +02:00
Bruno Windels
ee4c132fb4 add todo 2020-09-28 16:06:41 +02:00
Bruno Windels
76381fbca1 open storage transactions synchronously
this (almost) makes it work in some browsers that otherwise
have throw a TransactionInactiveError on the first operation
you try to do on a store.
2020-09-28 16:06:41 +02:00
Bruno Windels
134b04c782 make flushing room key shares reentrant
as it can be called from Room.start while still running.
2020-09-25 10:45:00 +02:00
Bruno Windels
4d616ce281 add todo for future optimisation 2020-09-24 10:35:09 +02:00
Bruno Windels
d53b5eefb3 fill in the blanks 2020-09-23 17:59:42 +02:00