Bruno Windels
a91bcf5d22
ensure there is no race between reconnecting & updating the session id
...
it's probably fine as connect has to wait to receive the
negotiationneeded event before it can send out an invite, but just to
be sure update the session id beforehand
2022-04-28 12:44:13 +01:00
Bruno Windels
b03b296391
comments, todo housekeeping
2022-04-27 19:41:25 +02:00
Bruno Windels
4f2999f8d8
reconnect when detecting session id change, so we send invite if needed
2022-04-27 19:41:02 +02:00
Bruno Windels
bffce7fafe
more logging
2022-04-27 19:40:49 +02:00
Bruno Windels
be04eeded0
always reevaluate remote media when receiving a new remote track
...
not just when we don't know the stream already
this caused the video track to not appear when the other party sends the
invite.
Also added more logging
2022-04-27 17:33:27 +02:00
Bruno Windels
230ccd95ab
reset retryCount when disconnecting
2022-04-27 17:33:12 +02:00
Bruno Windels
6b22078140
prevent localMedia being disposed when disconnecting on session change
...
this would cause us to not send any media anymore and a black screen
on the other side that just refreshed
2022-04-27 11:34:05 +01:00
RMidhunSuresh
049a477008
Pass flowSelector from Client.startRegistration
2022-04-27 12:27:19 +05:30
Bruno Windels
beeb191588
reset member when seeing a new session id
...
also buffer to_device messages for members we don't have a member event
for already.
2022-04-26 21:11:41 +02:00
Bruno Windels
eea3830146
emit change when muting so our own video feed gets hidden in the view
2022-04-26 16:18:49 +02:00
Bruno Windels
9ab75e8ed4
fix c/p error mixing up audio and video muting
2022-04-26 15:48:03 +02:00
Bruno Windels
b46ec8bac4
Merge branch 'bwindels/calls-wip' into bwindels/calls
2022-04-26 14:29:04 +02:00
Bruno Windels
f61064c462
nicer UI for calls, show avatar when muted, muted status
2022-04-26 14:27:28 +02:00
Bruno Windels
330f234b5a
prefer undefined over null
2022-04-26 14:21:19 +02:00
Bruno Windels
3198ca6a92
expose remote mute settings
2022-04-26 14:20:44 +02:00
Bruno Windels
22df062bbb
fix observable typescript errors
2022-04-25 14:05:02 +02:00
Bruno Windels
cdb2a79b62
add muting again, separate from changing media
2022-04-22 14:48:14 +01:00
Bruno Windels
ac60d1b61d
remove thick abstraction layer
...
instead just copy the DOM typing and make it part of the platform layer
2022-04-21 17:40:45 +02:00
Bruno Windels
10a6269147
always send new metadata after calling setMedia
2022-04-21 10:15:57 +02:00
Bruno Windels
55c6dcf613
don't re-clone streams when not needed
2022-04-21 10:11:24 +02:00
Bruno Windels
99769eb84e
implement basic renegotiation
2022-04-21 10:10:49 +02:00
Bruno Windels
82ffb557e5
update TODO
2022-04-21 10:09:31 +02:00
Bruno Windels
d6b239e58f
ensure we always set the correct session id when joining
2022-04-20 16:42:20 +02:00
Bruno Windels
c42292f1b0
more WIP
2022-04-20 10:57:07 +02:00
Bruno Windels
382fba88bd
WIP for muting
2022-04-14 23:19:44 +02:00
Bruno Windels
ea1c3a2b86
Merge remote-tracking branch 'origin/bwindels/calls' into bwindels/calls
2022-04-14 13:47:23 +02:00
Bruno Windels
021b8cdcdc
send hangup when leaving the call
...
but not when somebody else leaves the call through a member event
2022-04-14 13:45:21 +02:00
Bruno Windels
ff856d843c
ensure all member streams are cloned
...
so we can stop them without affecting the main one
also, only stop them when disconnecting from the member, rather then
when the peer call ends, as we might want to retry connecting to
the peer with the same stream.
2022-04-14 13:44:11 +02:00
Robert Long
55097e4154
Add intent to CallHandler
2022-04-13 13:08:47 -07:00
Bruno Windels
bc118b5c0b
WIP
2022-04-13 18:34:01 +02:00
Bruno Windels
2d4301fe5a
WIP: expose streams, senders and receivers
2022-04-12 21:20:24 +02:00
Bruno Windels
36dc463d23
update TODO
2022-04-12 21:20:15 +02:00
Bruno Windels
0e9307608b
update TODO
2022-04-12 14:02:57 +02:00
Bruno Windels
2635adb232
hardcode turn server for now
2022-04-12 14:02:38 +02:00
Bruno Windels
797cb23cc7
implement receiving hangup, and retry on connection failure
2022-04-12 14:02:13 +02:00
Bruno Windels
fd5b2aa7bb
only create datachannel on side that sends invite
2022-04-11 16:29:46 +02:00
Bruno Windels
517e796e90
remove obsolete import
2022-04-11 15:56:31 +02:00
Bruno Windels
c99fc2ad70
use deviceId getter in Member
2022-04-11 15:54:41 +02:00
Bruno Windels
9be64730b6
don't automatically join a call we create
2022-04-11 15:54:06 +02:00
Bruno Windels
b84c90891c
add very early datachannel support
2022-04-11 15:53:34 +02:00
Bruno Windels
c02e1de001
log when renegotiation would be triggered
2022-04-11 14:55:14 +02:00
Bruno Windels
8153060831
only send to target device, not all user devices
2022-04-11 13:39:40 +02:00
Bruno Windels
302d4bc02d
use session id from member event, and also send it for other party
2022-04-11 13:39:18 +02:00
Bruno Windels
1b0abebe8f
remove unused constants
2022-04-11 12:37:05 +02:00
Bruno Windels
156f5b78bf
use session_id from member event to set dest_session_id
...
so our invite event isn't ignored by EC
2022-04-11 12:36:02 +02:00
Bruno Windels
8a06663023
load all call members for now at startup
...
later on we can be smarter and load then once you interact with the call
2022-04-07 16:55:41 +02:00
Bruno Windels
b133f58f7a
don't throw here for now, although it is probably a sign of why the tracks disappear
2022-04-07 16:54:47 +02:00
Bruno Windels
bade40acc6
log track length
2022-04-07 16:54:36 +02:00
Bruno Windels
1dc46127c3
no need to throw here
2022-04-07 16:54:24 +02:00
Bruno Windels
79411437cf
fix who initiates call, needs to be lower, not higher
2022-04-07 16:53:57 +02:00
Bruno Windels
6472800387
impl session id so EC does not ignore our messages
2022-04-07 16:53:37 +02:00
Bruno Windels
fe6e7b09b5
don't encrypt to_device messages for now
2022-04-07 16:50:16 +02:00
Bruno Windels
9755062563
fix error thrown during request when response code is not used
2022-04-07 10:35:00 +02:00
Bruno Windels
ad1cceac86
fix error thrown during request when response code is not used
2022-04-07 10:33:12 +02:00
Bruno Windels
2852834ce3
persist calls so they can be quickly loaded after a restart
...
also use event prefixes compatible with Element Call/MSC
2022-04-07 10:32:43 +02:00
Bruno Windels
d7360e7741
fix multiple device support
2022-03-30 15:18:46 +02:00
Bruno Windels
c54ffd4fc3
support multiple devices in call per user
2022-03-29 17:13:33 +02:00
Bruno Windels
ba45178e04
implement terminate and hangup (currently unused)
2022-03-29 12:01:47 +02:00
Bruno Windels
11a9177592
log state changes in PeerCall
2022-03-29 12:01:47 +02:00
Bruno Windels
eaf92b382b
add structured logging to call code
2022-03-29 12:01:47 +02:00
Bruno Windels
a0a07355d4
more improvements, make hangup work
2022-03-29 12:01:47 +02:00
Bruno Windels
0a37fd561e
just enough view code to join a call
2022-03-29 12:01:47 +02:00
Bruno Windels
9efd191f4e
some more fixes
2022-03-29 12:01:46 +02:00
Bruno Windels
cad2aa760d
some fixes
2022-03-29 12:01:46 +02:00
Bruno Windels
e760b8e556
basic view model setup
2022-03-29 12:01:46 +02:00
Bruno Windels
6daae797e5
fix some ts/lint errors
2022-03-29 12:01:46 +02:00
Bruno Windels
07bc0a2376
move observable values each in their own file
2022-03-29 12:01:46 +02:00
Bruno Windels
1bccbbfa08
fix typescript errors
2022-03-29 12:01:46 +02:00
Bruno Windels
f674492685
remove local media promises (handle them outside of call code) + glare
2022-03-29 12:01:46 +02:00
Bruno Windels
3c160c8a37
handle remote ice candidates
2022-03-29 12:01:46 +02:00
Bruno Windels
b213a45c5c
WIP: work on group call state transitions
2022-03-29 12:01:46 +02:00
Bruno Windels
b2ac4bc291
WIP13
2022-03-29 12:01:46 +02:00
Bruno Windels
6da4a4209c
WIP: work on group calling code
2022-03-29 12:01:46 +02:00
Bruno Windels
4bedd4737b
WIP11
2022-03-29 12:01:46 +02:00
Bruno Windels
60da85d641
WIP10
2022-03-29 12:01:46 +02:00
Bruno Windels
6fe90e60db
WIP9
2022-03-29 12:01:46 +02:00
Bruno Windels
ecf7eab3ee
WIP8 - implement PeerCall.handleAnswer and other things
2022-03-29 12:01:46 +02:00
Bruno Windels
25b0148073
WIP8
2022-03-29 12:01:46 +02:00
Bruno Windels
98b77fc761
WIP7
2022-03-29 12:01:46 +02:00
Bruno Windels
179c7e74b5
WIP6
2022-03-29 12:01:46 +02:00
Bruno Windels
98e1dcf799
WIP5
2022-03-29 12:01:46 +02:00
Bruno Windels
e5f44aecfb
WIP4
2022-03-29 12:01:46 +02:00
Bruno Windels
468841ecea
WIP3
2022-03-29 12:01:46 +02:00
Bruno Windels
b12bc52c4a
WIP2
2022-03-29 12:01:46 +02:00
Bruno Windels
46ebd55092
WIP
2022-03-29 12:01:46 +02:00
Bruno Windels
ca211f929b
Merge pull request #702 from vector-im/bwindels/observablemapts
...
convert (Base)ObservableMap to typescript
2022-03-09 11:53:59 +01:00
Bruno Windels
6d7c983e8e
convert (Base)ObservableMap to typescript
2022-03-09 11:33:49 +01:00
Bruno Windels
2e1283d199
Merge pull request #670 from vector-im/bwindels/ts-olm
...
Convert olm code to typescript
2022-03-01 18:53:22 +01:00
Bruno Windels
b6d9993ed0
remove unused import
2022-03-01 17:08:49 +01:00
Bruno Windels
8adc5a9fae
these were public actually
2022-02-18 17:24:55 +01:00
Bruno Windels
3f9f0e98c7
remove unused olm property in SenderKeyDecryption
2022-02-18 17:21:27 +01:00
Bruno Windels
82299e5aea
Update src/matrix/e2ee/olm/Decryption.ts
...
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
2022-02-18 17:18:33 +01:00
Bruno Windels
3330530f68
Update src/matrix/e2ee/DecryptionResult.ts
...
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
2022-02-18 17:18:25 +01:00
Bruno Windels
620409b3f0
fixup: ctor argument order
...
as it was an object before, order didn't matter
2022-02-18 17:17:24 +01:00
Bruno Windels
78e0bb1ff0
replace isPreKeyMessage with const enum
2022-02-18 17:00:56 +01:00
Bruno Windels
347edb5988
remove unused storage property
2022-02-18 16:47:47 +01:00
Bruno Windels
60f5da60bb
fix lint
2022-02-16 18:01:24 +01:00
Bruno Windels
e3e90ed167
convert olm/Encryption to TS
2022-02-16 18:00:13 +01:00
Bruno Windels
eb5ca200f2
missed rename here
2022-02-16 18:00:03 +01:00
RMidhunSuresh
7a9298328f
Return _type from getter
2022-02-16 14:37:18 +05:30
RMidhunSuresh
a76bcd1739
Changes in TokenAuth
2022-02-16 13:36:24 +05:30
RMidhunSuresh
60bc4450f3
Use type from server
2022-02-16 13:21:04 +05:30
RMidhunSuresh
ed151c8567
Return token stage from createRegistrationStage
2022-02-16 12:33:59 +05:30
RMidhunSuresh
c40801efd9
Implement the registration stage
2022-02-16 12:33:24 +05:30
Bruno Windels
a4fd1615dd
convert decryption
2022-02-15 18:21:29 +01:00
Bruno Windels
74c640f937
convert Session
2022-02-15 18:21:12 +01:00
Bruno Windels
7aeda70ff6
convert DecryptionResult
2022-02-15 18:20:14 +01:00
Bruno Windels
9685ef4dd3
dont log summary valued, as they can contain PII
2022-02-11 18:39:37 +01:00
Bruno Windels
ea8f3e5a6a
remove argument that is already bound in BaseRoom, making decryption fail
2022-02-11 17:14:56 +01:00
Bruno Windels
175f869c83
fix lint
2022-02-10 20:07:27 +01:00
Bruno Windels
a442b4b009
Merge branch 'master' into bwindels/create-room
2022-02-10 20:05:40 +01:00
Bruno Windels
d65b25f084
also adjust m.direct if the room has already been replaced
2022-02-10 20:00:01 +01:00
Bruno Windels
2765f48a64
create user id array in m.direct if it doesn't exist already
2022-02-10 19:59:44 +01:00
Bruno Windels
d2008a336b
fix lint errors
2022-02-10 19:54:47 +01:00
Bruno Windels
ff46d382ac
adjust m.direct when creating a DM
2022-02-10 19:54:15 +01:00
Bruno Windels
8526461d3c
split up create code into separate files
2022-02-10 16:43:32 +01:00
Bruno Windels
75bbde598d
also consider rooms without a name and just you and the other a DM
...
as we don't process m.direct account data yet
2022-02-10 14:39:18 +01:00
Bruno Windels
147810864f
add support to set alias and federation flag in create room
2022-02-10 14:09:18 +01:00
Bruno Windels
b5536830d0
improve RoomBeingCreatedView, allow removing the roombeingcreated
2022-02-10 11:07:29 +01:00
Bruno Windels
20493f9e87
cleanup
2022-02-10 11:07:13 +01:00
Bruno Windels
f12841b2d3
better error handling in RoomBeingCreated
2022-02-10 11:06:20 +01:00
Bruno Windels
d6d1af13d0
rename RoomBeingCreated.localId to id
2022-02-10 11:03:52 +01:00
Bruno Windels
74f7879cb6
fix unrelated bug: invite sorting order wasn't stable in left panel
...
as the timestamp is the same when you receive the invite during your
first sync
2022-02-10 09:40:03 +01:00
Bruno Windels
83d2b58bad
add avatar support to creating room
2022-02-09 19:00:00 +01:00
Bruno Windels
afe8e17a6f
remove debugging code
2022-02-08 17:00:06 +01:00
Bruno Windels
5325b0b466
cleanup logging
2022-02-08 14:58:29 +01:00
Bruno Windels
45c8e3a793
mark room as DM based on synced state events,rather than just inviteData
...
as that does not work for rooms we create ourselves
2022-02-08 14:34:34 +01:00
Bruno Windels
e04463c143
WIP for finding DM room
2022-02-07 18:58:53 +01:00
Bruno Windels
26fa2a5d60
add option
2022-02-07 18:58:43 +01:00
Bruno Windels
e1fbd1242e
WIP 4
2022-02-07 16:30:44 +01:00
Bruno Windels
0bb3cfcfad
WIP3
2022-02-04 17:49:10 +01:00
RMidhunSuresh
28931f4103
Use async/await
2022-02-04 17:48:42 +05:30
RMidhunSuresh
f7f32ac806
responseCodeReject may not exist
2022-02-04 17:39:52 +05:30
RMidhunSuresh
a163cee18d
Remove dead imports
2022-02-04 17:25:30 +05:30
RMidhunSuresh
0828ac12b1
Fix params
2022-02-04 17:25:15 +05:30
RMidhunSuresh
b59f916824
Merge branch 'registration' of github.com:vector-im/hydrogen-web into registration
2022-02-04 17:16:32 +05:30
R Midhun Suresh
2ac63e78ca
mark method as internal
...
Co-authored-by: Bruno Windels <bruno@windels.cloud>
2022-02-04 17:16:15 +05:30
RMidhunSuresh
028b96e4c5
Let type also be undefined
2022-02-04 17:11:33 +05:30
RMidhunSuresh
22d5505a2b
Create registration stage in Registration itself
2022-02-04 16:50:22 +05:30
RMidhunSuresh
e66549a067
Remove dead code
2022-02-04 16:40:49 +05:30
RMidhunSuresh
e8c480426a
Remove error code
2022-02-04 16:37:43 +05:30
RMidhunSuresh
891375a885
Rename allowerErrors -> allowedStatusCodes
2022-02-04 16:35:47 +05:30
RMidhunSuresh
32af7e6f09
Make more changes
...
- make setter a method
- lazily create promise
2022-02-04 16:23:39 +05:30
RMidhunSuresh
3d8b9cce41
Fix responseCode in Request
2022-02-04 15:41:37 +05:30
Bruno Windels
bc09ede09f
WIP
2022-02-03 17:57:35 +01:00
RMidhunSuresh
b6e1d4a7d5
Implement responseCode()
2022-02-03 19:41:14 +05:30
RMidhunSuresh
89a97537b0
Make methods private + some props readonly
2022-02-03 19:41:14 +05:30
RMidhunSuresh
8a3c0afba6
Fix incorrect types
2022-02-03 19:41:11 +05:30
RMidhunSuresh
0ad0ecfcc2
Check response code instead of existence of props
2022-02-03 19:40:25 +05:30
RMidhunSuresh
c4894f2c24
completed is not always present
2022-02-03 19:40:25 +05:30
RMidhunSuresh
e64f4ad7b2
Refactor code
...
- Move all code that does /register to Registration.ts
- RegistrationStage only deals with the generation of auth data
- Change API so that undefined is returned instead of string when
registration is over
2022-02-03 19:40:25 +05:30
R Midhun Suresh
2aad5546bf
No need for Object.assign here either
...
Co-authored-by: Bruno Windels <brunow@matrix.org>
2022-02-03 19:40:25 +05:30
RMidhunSuresh
7bacbec5e9
Remove type directory
2022-02-03 19:40:25 +05:30
RMidhunSuresh
e13040a49e
Don't mutate flows
2022-02-03 19:40:25 +05:30
R Midhun Suresh
30cb9f6d15
Use includes instead of elaborate find
...
Co-authored-by: Bruno Windels <brunow@matrix.org>
2022-02-03 19:40:25 +05:30
RMidhunSuresh
a351a185a0
Give proper names
2022-02-03 19:40:25 +05:30
RMidhunSuresh
fe0add01ee
Use union of types for RegistrationResponse
2022-02-03 19:40:25 +05:30
RMidhunSuresh
a249a1b2b5
Implement flow seclector
2022-02-03 19:40:25 +05:30
RMidhunSuresh
6798a5e429
Move types to types.ts
2022-02-03 19:40:25 +05:30
RMidhunSuresh
3a67da8830
Refactor type
...
- Change name
- Move union type down
2022-02-03 19:40:25 +05:30
RMidhunSuresh
1d4b079d0c
Type RegistrationResponse
2022-02-03 19:40:25 +05:30
RMidhunSuresh
49ade61ef6
Fill in ts types + change names
2022-02-03 19:40:25 +05:30
RMidhunSuresh
b482d478b4
Add a tos getter
2022-02-03 19:40:25 +05:30
RMidhunSuresh
ac7108b882
Throw error instead of returning it
2022-02-03 19:40:25 +05:30
RMidhunSuresh
7bb7189c6a
No need for this export
2022-02-03 19:40:25 +05:30
RMidhunSuresh
6eba60bd75
Use typescript style that was agreed on earlier
2022-02-03 19:40:25 +05:30
RMidhunSuresh
5de1fc1453
Remove unnecessary getters
2022-02-03 19:40:25 +05:30
RMidhunSuresh
2f3865d8cc
firstStage should be a local variable
2022-02-03 19:40:25 +05:30
RMidhunSuresh
2d4c106542
REFACTOR: Inline method
2022-02-03 19:40:25 +05:30
RMidhunSuresh
a91ba4370d
Change type to show that username is optional
2022-02-03 19:40:25 +05:30
RMidhunSuresh
550a560f40
Remove space
2022-02-03 19:40:25 +05:30
RMidhunSuresh
5f11790f6b
Object.assign is overkill here
2022-02-03 19:40:25 +05:30
RMidhunSuresh
e8dbbd876c
Give default values to parameters
2022-02-03 19:40:25 +05:30
RMidhunSuresh
755f934eb2
No need to explicitly pass in inhibitLogin
2022-02-03 19:40:25 +05:30
RMidhunSuresh
5e93e048ab
Don't cache GET requests
2022-02-03 19:40:25 +05:30
RMidhunSuresh
bb6a885116
Specify what errors are ignored in options
2022-02-03 19:40:25 +05:30
RMidhunSuresh
420c12f202
Copy over username only if it exists
2022-02-03 19:40:25 +05:30
RMidhunSuresh
792d5c62c5
Return username when registration is completed
2022-02-03 19:40:25 +05:30
RMidhunSuresh
fa2e2bc8f3
Allow register without providing username
2022-02-03 19:40:25 +05:30
RMidhunSuresh
170d7a5e55
Add startRegistration method
2022-02-03 19:40:25 +05:30
RMidhunSuresh
8ab8726b8f
Implement m.login.terms stage
2022-02-03 19:40:25 +05:30
RMidhunSuresh
18e2fc1089
Pass in params to BaseRegistrationStage
2022-02-03 19:40:25 +05:30
RMidhunSuresh
a59b67ec45
Fix errors
2022-02-03 19:40:25 +05:30
RMidhunSuresh
d76a059525
Temporary fix for 401 errors
2022-02-03 19:40:25 +05:30
RMidhunSuresh
d28ab919bb
Implement dummy registration logic
2022-02-03 19:40:25 +05:30
RMidhunSuresh
eb146830ba
Implement registration endpoint
2022-02-03 19:40:25 +05:30
RMidhunSuresh
618d02d838
fetch registration flows
2022-02-03 19:40:25 +05:30
Bruno Windels
348de312f9
draft code in matrix layer to create room
2022-02-02 10:19:49 +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
00c5e747d2
log total backed up keys during flush operation
2022-02-01 12:30:45 +01:00
Bruno Windels
b29ecd339d
add more logging to backup storage migration
2022-02-01 12:18:28 +01:00
Bruno Windels
f4fa013ebc
mark as not configured yet when re-enabling key backup
2022-02-01 11:32:53 +01:00
Bruno Windels
f4bb420f35
mark key backup properly as disabled
2022-02-01 11:27:42 +01:00
Bruno Windels
02f06724d0
don't block reenabling 4s if already enabled
2022-02-01 11:26:00 +01:00
Bruno Windels
fd4eb6b50d
distinguish between "waiting to go online" vs "backup not configured"
2022-02-01 11:08:13 +01:00
Bruno Windels
9c599d53aa
allow to inject max delay in key backup
2022-01-31 17:31:01 +01:00
Bruno Windels
62acd458c6
also ask for new key if backup version is not found
2022-01-31 17:30:51 +01:00
Bruno Windels
17275a5390
backup 200 keys per request
2022-01-31 17:30:15 +01:00
Bruno Windels
830786b2fd
fixes and cleanup
2022-01-31 16:26:14 +01:00
Bruno Windels
6541aacf98
don't discount already finished keys in total for previous iterations
2022-01-31 16:23:48 +01:00
Bruno Windels
a757fb3696
better error handling in key backup, cleanup and not overuse observables
2022-01-31 14:37:05 +01:00
Bruno Windels
7eb0d347f5
flush key backup after coming online
2022-01-31 14:36:35 +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
a97d235cf5
flush after enabling key backup
2022-01-28 16:36:42 +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
504f420293
make keyBackup an observable and don't have separate needs-key flag
2022-01-28 15:13: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
7d3e3b992b
some more typing
2022-01-28 13:14:38 +01:00
Bruno Windels
c47bdd5715
flush key backup when creating a new room key
2022-01-28 13:14:11 +01:00
Bruno Windels
b692b3ec4f
move key backup operation and flush bookkeeping inside KeyBackup
...
so we can flush from other places than Session
2022-01-28 13:13:23 +01:00
Bruno Windels
ebc7f1ecd7
needs to be awaited
2022-01-28 13:11:52 +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
dd2b41ff95
use backup flag in key backup rather than separate store
2022-01-27 16:07:18 +01:00
Bruno Windels
48e72f9b69
replace SessionsNeedingBackup store with backup field on inbound session
2022-01-27 16:00:46 +01:00
Bruno Windels
6f1484005b
stop key backup when on the wrong version
...
users can then enter the new key in the settings to start backing up
again
2022-01-27 15:14:29 +01:00
Bruno Windels
0b4954a9ca
log key backup upload requests
2022-01-27 14:20:04 +01:00
Bruno Windels
bf08c0d850
deal with errors when enabling key backup
...
fixes #449
2022-01-27 14:19:37 +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
a791641b34
move types to separate file
2022-01-26 12:10:20 +01:00
Bruno Windels
85155a43bb
cleanup types
2022-01-26 10:17:31 +01:00
Bruno Windels
cfb94206f9
move curve25519 code to separate file
2022-01-26 10:13:01 +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
933a1b4636
draft of session backup writing + some refactoring
2022-01-25 18:48:19 +01:00
Bruno Windels
ffece4f357
move some validation of into session backup
2022-01-25 18:48:03 +01:00
Bruno Windels
8f4e3c62ce
add hs endpoint for backup keys upload
2022-01-25 18:47:42 +01:00
Bruno Windels
290aaad63a
add sessionsNeedingBackup store
2022-01-25 18:47:27 +01:00
Bruno Windels
a3e294bb60
small cleanup
2022-01-25 18:45:39 +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
993a86ddb2
convert SessionBackup to typescript and pass in keyloader
2022-01-20 11:16:08 +01:00
Bruno Windels
a4d924acd1
make KeyLoader use proper olm types
2022-01-20 11:15:48 +01:00
Bruno Windels
c6c1d3b3d8
refactor logout in client so we don't need a fully loaded session
...
instead, we pass the session id in
this will make it easier to first dispose the client when leaving the
/session/<id> and just creating a client without fully loading it
to log out. This way sync is already not running anymore.
2022-01-17 16:29:01 +01:00
Bruno Windels
000c8b27c3
Merge pull request #637 from vector-im/bwindels/timeline-readme
...
add basic readme for updates in the timeline
2022-01-14 19:16:25 +01:00
Bruno Windels
a8a8355ea4
fix unit test
2022-01-14 19:05:53 +01:00
Bruno Windels
3d00881508
don't look in remoteEntries when already found
2022-01-14 19:05:30 +01:00
Bruno Windels
7197e5427f
don't emit an update when the context entry is loaded sync
...
also load context entries in parallel
2022-01-14 18:16:52 +01:00
Bruno Windels
3243ce2a90
fix unit test that failed after it finished
...
crashing the runner on node 16
2022-01-14 18:15:46 +01:00
RMidhunSuresh
cfefe6962a
Remove stray space
2022-01-14 18:17:49 +05:30
RMidhunSuresh
0ae3c60d6d
Remove .js file from rebase
2022-01-14 18:17:49 +05:30
RMidhunSuresh
35a13842af
Implement context endpoint
2022-01-14 18:17:49 +05:30
RMidhunSuresh
65f957f023
WIP
2022-01-14 18:17:49 +05:30
R Midhun Suresh
4fb0a84d0a
Return property from super
...
Co-authored-by: Bruno Windels <brunow@matrix.org>
2022-01-14 18:16:38 +05:30
RMidhunSuresh
30b8e5b5ea
use withReply
2022-01-14 18:15:26 +05:30
RMidhunSuresh
8cd430ac07
Improve test logic
2022-01-14 17:48:25 +05:30
RMidhunSuresh
75012eda9c
Fix tests
2022-01-14 17:28:31 +05:30
RMidhunSuresh
e9a49fdf74
Use hsApi mock
2022-01-14 17:07:06 +05:30
RMidhunSuresh
315acf2fbc
Remove dead code from test
2022-01-14 16:54:16 +05:30
RMidhunSuresh
310790c84e
Use mock storage
2022-01-14 16:51:06 +05:30
RMidhunSuresh
277638b107
Override methods in NonPersistedEventEntry
...
This will prevent redactions to entries fetched from hs showing "message
is being redacted" and will instead show "message is redacted"
2022-01-14 16:15:16 +05:30
RMidhunSuresh
b238357c53
Use emitUpdateForEntry
2022-01-14 16:14:42 +05:30
RMidhunSuresh
4fa32bac2f
check only in remoteEntries
2022-01-14 16:14:06 +05:30
Bruno Windels
58f2192a7e
add basic readme for updates in the timeline
2022-01-14 11:13:21 +01:00
RMidhunSuresh
3c28ee1adf
Remove unused getter
2022-01-13 21:05:18 +05:30
RMidhunSuresh
2c4610c132
add param to emitUpdateForEntry
2022-01-13 19:20:37 +05:30
RMidhunSuresh
239d16747d
Clean test code; try not to peek into internals
2022-01-13 19:14:28 +05:30
RMidhunSuresh
764541d3ca
Remove unused method
2022-01-13 18:32:18 +05:30
RMidhunSuresh
ca1831fef6
update contextForEntries
2022-01-13 14:38:05 +05:30
RMidhunSuresh
2f4c0623d0
Restore earlier name
2022-01-12 19:20:32 +05:30
RMidhunSuresh
ed88184757
Remove statement
2022-01-12 19:14:38 +05:30
RMidhunSuresh
d0f7570f5e
Fix tests
2022-01-12 18:44:17 +05:30
RMidhunSuresh
acafae7d3a
Implement offline support for context entries
2022-01-11 20:58:27 +05:30
RMidhunSuresh
a59bf7c002
Fix looking in allEntries
2022-01-11 20:57:29 +05:30
RMidhunSuresh
5c1813888c
Check in all entries for context
2022-01-11 14:57:22 +05:30
RMidhunSuresh
73733ce145
Guard entry from storage being processed by method
2022-01-11 14:49:59 +05:30
RMidhunSuresh
bf6dfcfcad
update comment
2022-01-11 13:28:35 +05:30
RMidhunSuresh
f605608098
getTrackedEntry -> findLoadedEventById
2022-01-11 13:20:42 +05:30
RMidhunSuresh
31a8227e53
stylistic change
2022-01-11 13:14:13 +05:30
RMidhunSuresh
62dcb61536
Rename updateEntry -> emitUpdateForEntry
2022-01-11 13:11:50 +05:30
RMidhunSuresh
fda211e7b3
Remove dead code
2022-01-11 13:10:40 +05:30
RMidhunSuresh
63b6564f70
Pass prop change
2022-01-11 11:54:41 +05:30
RMidhunSuresh
93bbeee400
Don't pass relatedEntry in param
2022-01-11 11:49:06 +05:30
RMidhunSuresh
66fa8d84a7
Make setAsContextOf private
2022-01-10 18:51:12 +05:30
RMidhunSuresh
091b55a265
Rename method and add comment
2022-01-10 18:05:33 +05:30
RMidhunSuresh
ec8f6e8e0a
use addLocalRelation
2022-01-10 12:58:45 +05:30
RMidhunSuresh
7ad73bb453
Move check down
2022-01-07 19:56:31 +05:30
RMidhunSuresh
3fecce6fe6
Fix tests
2022-01-07 19:39:51 +05:30
RMidhunSuresh
9d161a0bcf
Refactor + put redaction in NonPersistedEventEntry
2022-01-07 19:38:57 +05:30
RMidhunSuresh
8cc04e4c25
Keep calls internal to class
2022-01-07 17:50:36 +05:30
RMidhunSuresh
0a09a50ab9
Move line into if
2022-01-07 17:29:17 +05:30
RMidhunSuresh
c6484f1eac
Replace entry in contextEntryNotInTimeline
2022-01-07 17:11:42 +05:30
RMidhunSuresh
cfbb6d4250
Add explaining comment
2022-01-06 15:37:58 +05:30
RMidhunSuresh
7adce08eee
add more jsdoc comments
2022-01-06 15:33:00 +05:30
RMidhunSuresh
f76217dcce
Change method name
2022-01-06 15:14:13 +05:30
RMidhunSuresh
a2ab36480f
Add jsdoc comment
2022-01-06 15:02:44 +05:30
RMidhunSuresh
90c9018aa4
Update comment
2022-01-06 12:07:10 +05:30
RMidhunSuresh
595deb3a3d
Also copy over contextEntry from otherEntry
2022-01-06 12:07:10 +05:30
RMidhunSuresh
78f97c6532
Remove await from tests
2022-01-06 12:07:10 +05:30
RMidhunSuresh
9f1764c325
Update comment
2022-01-06 12:07:10 +05:30
RMidhunSuresh
4418700589
Add test for move code
2022-01-06 12:07:10 +05:30
RMidhunSuresh
d2c7eec8e0
No need to delete before update on map
2022-01-06 12:07:10 +05:30
RMidhunSuresh
8ec75ce4bb
Rename methods
2022-01-06 12:07:10 +05:30
RMidhunSuresh
a060d54468
Make tests pass
2022-01-06 12:07:10 +05:30
RMidhunSuresh
3fe824dbd1
Propagate updates
2022-01-06 12:07:10 +05:30
RMidhunSuresh
7ef79c92f5
Remove entry from map
2022-01-06 12:07:10 +05:30
RMidhunSuresh
2d5bb82077
Fix bug
2022-01-06 12:07:10 +05:30
RMidhunSuresh
6f8001bd82
Add tests
2022-01-06 12:07:10 +05:30
RMidhunSuresh
640a3fb9fa
Check if contextEvent was found
2022-01-06 12:07:10 +05:30
RMidhunSuresh
05d2defa2d
Rename fetchedEntries --> contextEntriesNotInTimeline
2022-01-06 12:07:10 +05:30
RMidhunSuresh
c3bef6d4d2
Rename dependents --> contextForEntries
2022-01-06 12:07:10 +05:30
RMidhunSuresh
d1818d2a57
Reuse code in getOrLoadEntry
2022-01-06 12:07:10 +05:30
RMidhunSuresh
f5fadf700e
Move event to remoteEntries if needed
2022-01-06 12:07:10 +05:30
RMidhunSuresh
d924dbb723
Add explaining comment
2022-01-06 12:07:10 +05:30
RMidhunSuresh
544dca3b18
Use _updateEntry
2022-01-06 12:07:10 +05:30
RMidhunSuresh
39f68e8c2f
Refactor out magic string
2022-01-06 12:07:10 +05:30
RMidhunSuresh
5c0bbdd4c8
Move methods into Timeline
2022-01-06 12:07:10 +05:30
RMidhunSuresh
51b7b21082
Implement readById() in TimelineReader
2022-01-06 12:07:10 +05:30
RMidhunSuresh
0da94e51e0
Use map and fetch from Map if available
2022-01-06 12:07:10 +05:30
RMidhunSuresh
4a6293dcdc
Made code more readable
2022-01-06 12:07:10 +05:30
RMidhunSuresh
287212956b
findAndUpdate instead of update
2022-01-06 12:07:10 +05:30
RMidhunSuresh
7a91dd9595
Improve comment
2022-01-06 12:07:10 +05:30
RMidhunSuresh
4a81e06e96
Track fetched entries for redactions
2022-01-06 12:07:10 +05:30
RMidhunSuresh
ea89c272b9
Support redaction changes in remoteEntries
2022-01-06 12:07:10 +05:30
RMidhunSuresh
c690de9f7b
Support decryption on entries fetched from hs
2022-01-06 12:07:10 +05:30
RMidhunSuresh
7cc3d4b91a
Emit updated entries
2022-01-06 12:07:10 +05:30
RMidhunSuresh
053dcf39a5
Use NonPersistedEventEntry
2022-01-06 12:07:10 +05:30
RMidhunSuresh
d191b327c6
Change comment
2022-01-06 12:07:10 +05:30
RMidhunSuresh
06864a65b7
Add contextEventId
2022-01-06 12:07:10 +05:30
RMidhunSuresh
764e38f8c9
Use 'context' instead of 'related'
2022-01-06 12:07:10 +05:30
RMidhunSuresh
696980aca4
Parse display name and avatar of event
2022-01-06 12:07:10 +05:30
RMidhunSuresh
0c42f53a2f
Implement context endpoint
2022-01-06 12:07:06 +05:30
RMidhunSuresh
e901142661
await on loading related events
2022-01-06 11:59:58 +05:30
RMidhunSuresh
2265d198a6
Formatting fix
2022-01-06 11:59:58 +05:30
RMidhunSuresh
b753507b8d
WIP
2022-01-06 11:59:58 +05:30
Bruno Windels
c9d11d6f19
missing otk count does not mean 0 but rather no change
2022-01-05 14:26:15 +01:00
Bruno Windels
aabfbf507e
typo in comments
2022-01-05 14:25:42 +01:00
Bruno Windels
ba27d20b24
only pass platform into Client
...
simplifying the API for SDK
2021-12-22 17:20:37 +01:00
Bruno Windels
fe26f48c47
rename SessionContainer to Client
2021-12-22 17:09:52 +01:00
Bruno Windels
dacdc1aec6
Merge pull request #597 from vector-im/ts-conversion-matrix-ssss
...
Convert matrix/ssss to typescript
2021-12-09 18:54:25 +01:00
Bruno Windels
21a41e192b
Merge branch 'master' into ts-conversion-matrix-net
2021-12-09 18:49:54 +01:00
Bruno Windels
8d315f2741
Merge branch 'master' into bwindels/log-signature-failure
2021-12-09 18:34:36 +01:00
Bruno Windels
0ec86b6dc1
Merge branch 'master' into bwindels/vite-mvp
2021-12-09 18:07:17 +01:00
RMidhunSuresh
734ecccb9c
Use object instead of Record here
2021-12-03 17:34:23 +05:30
RMidhunSuresh
e2abc312d3
Fix typescript errors
2021-12-03 11:48:01 +05:30
RMidhunSuresh
d6378133d8
Remove length property
2021-12-03 11:40:26 +05:30
RMidhunSuresh
49a56efa82
Remove comment
2021-12-03 11:40:26 +05:30
RMidhunSuresh
640cd88b6e
make type string
2021-12-03 11:40:26 +05:30
RMidhunSuresh
66b4f9bfe5
LogItem --> ILogItem
2021-12-03 11:40:26 +05:30
RMidhunSuresh
0541cf8f2b
Change object to Record
2021-12-03 11:40:26 +05:30
RMidhunSuresh
bf93bd79c9
types.js --> types
2021-12-03 11:40:26 +05:30
RMidhunSuresh
f89b937ee7
Use object instead of Record
2021-12-03 11:40:26 +05:30
RMidhunSuresh
82de3c9867
Prefer type over interface
2021-12-03 11:40:26 +05:30
RMidhunSuresh
b328c54da8
Change type from Ctor to Options
2021-12-03 11:40:26 +05:30
RMidhunSuresh
e9cea73357
Remove comment
2021-12-03 11:40:26 +05:30
R Midhun Suresh
3fbf65355d
Rename Ctor to Options
...
Co-authored-by: Bruno Windels <brunow@matrix.org>
2021-12-03 11:40:26 +05:30
RMidhunSuresh
b5438f2ba8
Do not set content-length
2021-12-03 11:40:26 +05:30
RMidhunSuresh
4f43398db0
Fix promise resolve type
2021-12-03 11:40:26 +05:30
RMidhunSuresh
05121e32b1
Pull interface out for HomeServerApi
2021-12-03 11:40:26 +05:30
RMidhunSuresh
a8870f2d24
Extract ctor types out
2021-12-03 11:40:26 +05:30
RMidhunSuresh
238b9aafb1
Convert replay.js to ts
2021-12-03 11:40:26 +05:30
RMidhunSuresh
2e6b909173
No need to pass undefined
2021-12-03 11:40:26 +05:30
RMidhunSuresh
4bdcafad4b
Rename file to types.ts
2021-12-03 11:40:26 +05:30
RMidhunSuresh
69e67ad5ac
Make more functions private
2021-12-03 11:40:26 +05:30
RMidhunSuresh
2dd050bd90
Change object to Record
2021-12-03 11:40:26 +05:30
RMidhunSuresh
9b315d1564
Replace object with Record
2021-12-03 11:40:26 +05:30
RMidhunSuresh
57d24dcf90
Treat wrapper hsapi as HomeServerApi
2021-12-03 11:40:26 +05:30
RMidhunSuresh
8387215efd
Add comment
2021-12-03 11:40:26 +05:30
RMidhunSuresh
885abc59be
Add return types
2021-12-03 11:40:26 +05:30
RMidhunSuresh
7403cbc389
WIP - HomeServerApi.js to ts conversion
2021-12-03 11:40:26 +05:30
RMidhunSuresh
145b40f28d
Fomatting fix
2021-12-03 11:40:26 +05:30
RMidhunSuresh
cf54b78af7
Convert RequestScheduler.js to ts
2021-12-03 11:40:26 +05:30
RMidhunSuresh
0aae31a450
Change year in copyright notice
2021-12-03 11:40:26 +05:30
RMidhunSuresh
f120ce50e6
Convert Reconnector.js to ts
2021-12-03 11:40:26 +05:30
RMidhunSuresh
90e3fde35d
Convert MediaRepository.js to ts
2021-12-03 11:40:26 +05:30
RMidhunSuresh
ff53c2757d
Convert HomeServerRequest.js to ts
2021-12-03 11:40:26 +05:30
RMidhunSuresh
e1a823400a
Convert ExponentialRetryDelay.js to ts
2021-12-03 11:40:26 +05:30
RMidhunSuresh
3a24019d96
Convert common.js to ts
2021-12-03 11:40:26 +05:30
RMidhunSuresh
9688a561b3
Move interface to common.ts
2021-12-03 11:40:26 +05:30
RMidhunSuresh
9bffd31ee3
Remove typeof
2021-12-03 11:36:51 +05:30
R Midhun Suresh
6dcebde69d
Alias namespace as Olm
...
Co-authored-by: Bruno Windels <brunow@matrix.org>
2021-12-03 11:36:51 +05:30
RMidhunSuresh
e06a0e9e5a
Use olm type from dependency
2021-12-03 11:36:51 +05:30
RMidhunSuresh
7362e38413
Convert interface to type
2021-12-03 11:36:51 +05:30
RMidhunSuresh
d2c09933c7
Type encrypted data
2021-12-03 11:36:51 +05:30
RMidhunSuresh
b2efcb9515
Convert SecretStorage.js to ts
2021-12-03 11:36:51 +05:30
RMidhunSuresh
814c0bed2e
Convert recoveryKey.js to ts
2021-12-03 11:36:51 +05:30
RMidhunSuresh
e45f66a199
Convert passphrase.js to ts
2021-12-03 11:36:51 +05:30
RMidhunSuresh
dd4704b818
Fix imports
2021-12-03 11:36:49 +05:30
RMidhunSuresh
9b8ab9fd8d
Convert index.js to index.ts
2021-12-03 11:35:12 +05:30
RMidhunSuresh
f9f59fec39
Convert common.js to ts
2021-12-03 11:34:09 +05:30
Bruno Windels
d91aaabeb3
Merge pull request #596 from vector-im/ts-conversion-matrix-sessioninfo
...
Convert matrix/sessioninfo to typescript
2021-12-02 09:29:11 +01:00
Bruno Windels
9042520916
Merge pull request #595 from vector-im/ts-conversion-matrix-push
...
Convert /matrix/push to typescript
2021-12-02 09:28:59 +01:00
Bruno Windels
d3ab961364
Merge pull request #593 from vector-im/ts-conversion-matrix-login
...
Convert /matrix/login to typescript
2021-12-02 09:28:47 +01:00
RMidhunSuresh
0c46460861
Add comment
2021-12-02 11:20:40 +05:30
RMidhunSuresh
9f82e7f7fc
Add proper type
2021-12-02 11:17:41 +05:30
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
Bruno Windels
7e1818b285
Merge branch 'master' into bwindels/vite-mvp
2021-12-01 12:30:33 +01:00
Bruno Windels
fc3eb7f57f
Merge branch 'master' into bwindels/typescript-observable-2
2021-11-30 16:37:43 +01:00
Bruno Windels
ef712b16f5
Merge pull request #584 from vector-im/ts-conversion-utils
...
Convert /utils to typescript
2021-11-30 14:13:09 +01:00
Bruno Windels
ae7d4d07df
use .name so we don't need an import
2021-11-25 15:42:36 +01:00
Bruno Windels
229c584138
don't fail login if dehydrated devices are not supported
2021-11-25 15:38:13 +01:00
RMidhunSuresh
bb18af414b
Convert SessionInfoStorage.js to ts
2021-11-25 15:18:03 +05:30
RMidhunSuresh
3d9fbb685a
Convert Pusher.js to ts
2021-11-25 13:23:05 +05:30
RMidhunSuresh
346e95c33c
Change return type
2021-11-25 12:33:12 +05:30
RMidhunSuresh
a31860dc5f
Fix formatting
2021-11-24 14:55:44 +05:30
RMidhunSuresh
c54ca168ed
Convert SSOLoginHelper.js to ts
2021-11-24 14:49:08 +05:30
RMidhunSuresh
a1367f8e72
Fix password login
2021-11-24 14:00:26 +05:30
RMidhunSuresh
64037cb32a
Convert TokenLoginMethod to ts
2021-11-24 13:56:47 +05:30
RMidhunSuresh
e4c443c73a
Convert PasswordLoginMethod to ts
2021-11-24 13:47:26 +05:30