Bruno Windels
0a00d4c865
use hsApi wrapper that handles rate-limiting instead of send scheduler
2020-09-22 13:43:18 +02:00
Bruno Windels
d7c25e3106
move MediaRepository out of HomeServerApi
...
so HomeServerApi becomes easier to wrap, only having methods
that return a RequestResult.
2020-09-22 13:40:38 +02:00
Bruno Windels
c9ee5a5db2
stay in catchup mode as long as there are device messages
...
this implements https://github.com/vector-im/element-web/issues/2782
it also implements 0 timeout for catchup, getting rid of the
catching up with your convo banner for 30s upon reconnection.
2020-09-21 17:57:01 +02:00
Bruno Windels
015c6b1c70
interpret unreported signed_curve25519 as 0 OTKs
2020-09-21 17:56:23 +02:00
Bruno Windels
da780d0aa2
delay backup 10s if missing session event came from sync
2020-09-18 13:11:02 +02:00
Bruno Windels
ed913ca24b
add dispose to room encryption
2020-09-18 13:08:18 +02:00
Bruno Windels
7d6fcfafa8
pass olm, better naming, don't reuse var
2020-09-17 18:55:39 +02:00
Bruno Windels
494c5cbcf0
notify UI when we need session backup
2020-09-17 18:00:00 +02:00
Bruno Windels
a205ae8841
fixes
2020-09-17 17:57:12 +02:00
Bruno Windels
9d622434fb
integrate session backup with session class
2020-09-17 15:58:46 +02:00
Bruno Windels
7f97c540fb
obsolete comment, this is already the case
2020-09-17 14:20:42 +02:00
Bruno Windels
abfde76e24
store account data in storage
...
needs a resync, need to think how to handle this
2020-09-17 10:39:51 +02:00
Bruno Windels
00eade1c16
add crypto driver with primitives needed for 4S & session backup
2020-09-17 10:19:09 +02:00
Bruno Windels
96119b4e58
load all pending operations when starting the session, pass to room
2020-09-11 14:41:40 +02:00
Bruno Windels
0dece5b04f
make continuation logic work well with pending events
...
- don't use display name to compare but user id
(pending doesn't have display name yet)
- use current time as timestamp
2020-09-11 11:43:40 +02:00
Bruno Windels
e0d9d703b7
offload olm account creation in worker
2020-09-11 10:43:17 +02:00
Bruno Windels
af36c71a59
load worker in main and pass paths so it works both on compiled and non-compiled
2020-09-10 18:41:23 +02:00
Bruno Windels
94b0cfbd72
add prepareSync and afterPrepareSync steps to sync, run decryption in it
2020-09-10 12:11:43 +02:00
Bruno Windels
212efe823c
fix memberlist not containing all members
...
we were using the prev_batch of the last sync to pass to
/members, but this points at the timeline *before* the last
sync, so wouldn't contain all members. Use the sync token instead.
2020-09-09 09:50:03 +02:00
Bruno Windels
1aa044667c
try sending out pending room keys after first sync
2020-09-08 14:39:07 +02:00
Bruno Windels
31d4b6f75d
send room keys to newly joined members in afterSyncCompleted stage
2020-09-08 14:38:27 +02:00
Bruno Windels
baad4bd37f
hookup megolm decryption in session
2020-09-04 15:31:27 +02:00
Bruno Windels
502ba5deea
first draft of decryption in Room and RoomEncryption
2020-09-04 12:09:19 +02:00
Bruno Windels
8ac80314c2
cleanup
2020-09-03 17:51:20 +02:00
Bruno Windels
c5efa582b1
check algorithm
2020-09-03 17:51:00 +02:00
Bruno Windels
c5c9505ce2
hookup megolm encryption in session
2020-09-03 17:50:28 +02:00
Bruno Windels
5cafef96f5
add RoomEncryption to room
2020-09-03 15:36:17 +02:00
Bruno Windels
792f0cf9a0
log our identity keys after load
2020-09-03 15:32:33 +02:00
Bruno Windels
1d4a5cd6d4
instantiate olm encryption in session
2020-09-03 15:32:08 +02:00
Bruno Windels
e22131bf57
don't store or return our own device
2020-09-03 15:28:20 +02:00
Bruno Windels
4f4808b94c
lock on senderKey while enc/decrypting olm sessions
2020-09-03 12:12:33 +02:00
Bruno Windels
279b55e8e6
fix test
2020-09-03 11:31:00 +02:00
Bruno Windels
1dbabf6240
cleanup ctor
2020-09-02 14:59:17 +02:00
Bruno Windels
14cba7ec6e
need to pass in olm
2020-09-02 14:52:19 +02:00
Bruno Windels
7d517eb700
wire up the olm decryption,megolm room key handler and to_device handler
2020-09-02 14:30:18 +02:00
Bruno Windels
81a1573e3b
make a shared olm util for the whole session
2020-09-01 17:57:59 +02:00
Bruno Windels
aeb2f5402a
process own membership changes before device lists
2020-08-31 16:08:47 +02:00
Bruno Windels
afb9ae4391
hook up device tracker with sync
2020-08-31 14:13:21 +02:00
Bruno Windels
a1ba5d7dba
between syncs, generate more otks if needed, and upload them
2020-08-28 13:58:17 +02:00
Bruno Windels
681dfdf62b
sync otk count to e2ee account
2020-08-28 13:56:44 +02:00
Bruno Windels
4c290f0394
upload identity and one-time keys
2020-08-27 19:13:24 +02:00
Bruno Windels
f98b3dd5fa
create/load olm account before first sync
2020-08-27 19:13:09 +02:00
Bruno Windels
3b24ea34f3
Merge branch 'master' into bwindels/e2ee
2020-08-27 14:40:57 +02:00
Bruno Windels
09a018ade1
store sync token and filter id under the same key in session
...
as they are updated together
2020-08-27 14:36:50 +02:00
Bruno Windels
14b27f81fe
store session values as individual values in store
...
so we don't have to write the whole object every time something changes
we'll use this to store the olm account
2020-08-27 14:28:40 +02:00
Bruno Windels
fe0257bca1
load olm and pass it to session
2020-08-27 13:24:55 +02:00
Bruno Windels
e4758d0651
we need to read from members now during load, for the heroes
...
and were actually not reading from room state
2020-08-21 18:14:07 +02:00
Bruno Windels
00a85697ab
add license header in all source files
2020-08-05 18:38:55 +02:00
Bruno Windels
a097929dbd
rename lowercase filenames of classes to camelcase like class
2020-04-20 21:41:10 +02:00
Bruno Windels
001dbefbcf
stop using default exports
...
because it becomes hard to remember where you used them and where not
2020-04-20 21:26:39 +02:00