Commit graph

1300 commits

Author SHA1 Message Date
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
RMidhunSuresh 91f2a96403 Make LoginMethod an interface 2021-11-24 13:40:04 +05:30
RMidhunSuresh 0c424cb77f Fix imports 2021-11-17 20:28:44 +05:30
RMidhunSuresh ea0adb4407 Convert RetainedValue.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh 88ec1b575d Convert mergeMap.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh 1549d8add0 Convert LockMap to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh c8eb7ea7ac Convert Lock.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh 4ce7634201 Convert error.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh ef53a12f7a Fix imports 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 3ee1607298 Convert utils to typescript 2021-11-16 12:32:49 +05:30
Bruno Windels 2da450d69d log signature verification failure in logger, not console 2021-11-15 15:27:57 +01:00
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 b6fda8865f make all dependencies use vite and remove post-install script / lib dir 2021-11-08 11:10:34 +01:00
Bruno Windels faa0246e28 setup new dehydrated device when claiming one 2021-11-05 20:53:04 +01:00
Bruno Windels 0749073120 clone key as olm clears it 2021-11-05 20:52:50 +01:00
Bruno Windels 790b9cbc13 require a flag to enable account setup during login
as it blocks login from progressing, any sdk usage should enable
to indicate they are listening for the AccountSetup status.
2021-11-03 02:28:01 +01:00
Bruno Windels bffe34fe0a await write key 2021-11-03 02:20:27 +01:00
Bruno Windels a8022077f6 add minimal logging 2021-11-03 02:20:11 +01:00
Bruno Windels 80a98f04c7 pickle clears the key, so slice it before calling so we can reuse for 4s 2021-11-03 02:08:27 +01:00
Bruno Windels 8a36eb4532 check mac of dehydrated key to match default 4s key mac before adopting 2021-11-03 02:07:57 +01:00
Bruno Windels 567cdd5510 WIP for enabling session backup from dehydration key 2021-10-29 19:17:31 +02:00
Bruno Windels 44a26fd340 key backup: add disable button,and enabling add dehydrated device option 2021-10-29 15:48:28 +02:00
Bruno Windels c3dfdde626 be forgiving when dispose has already been called 2021-10-28 12:04:42 +02:00
Bruno Windels 544019f67d ensure olm Account in dehydrated device is freed on error 2021-10-28 11:52:32 +02:00
Bruno Windels bef12c7a8f prevent double free on olm account when logging out
by ensuring we only dispose the e2ee/Account once, as well as
the Session and other classes
2021-10-28 11:48:25 +02:00
Bruno Windels 68a6113c26 add logout button to session load error screen 2021-10-28 11:47:31 +02:00
Bruno Windels e3378d5636 use correct device_id in signatures for dehydrating device
completely replace device id for dehydrating device
so we don't have to pass it down the stack
2021-10-27 18:08:50 +02:00
Bruno Windels c89e414bb5 WIP3 2021-10-27 15:08:53 +02:00
Bruno Windels 718b410253 WIP2 2021-10-27 10:26:36 +02:00
Bruno Windels faf4ea6434 WIP 2021-10-26 18:47:46 +02:00
Bruno Windels 0f0719eaa2
Merge pull request #560 from vector-im/bwindels/logout
Add Log out
2021-10-26 15:10:21 +02:00
Bruno Windels 82a0c1024c return static string when member is missing and add logging 2021-10-26 15:08:51 +02:00
Bruno Windels f998041748 add logout button in settings 2021-10-26 12:49:31 +02:00
Bruno Windels 67dd929951 put key session check in method 2021-10-26 11:14:46 +02:00
Bruno Windels ab2f15b5a2 prevent cache hiding better keys in storage (+ tests) 2021-10-25 19:17:13 +02:00
Bruno Windels 3c2604b384 test that sessions get free'd correctly 2021-10-25 17:33:33 +02:00
Bruno Windels 74e8bc3bda write unit tests 2021-10-25 17:19:48 +02:00
Bruno Windels 6bbce06d93 start writing tests for key loader 2021-10-22 19:01:20 +02:00
Bruno Windels 22361bdf42 don't need to dispose room keys anymore, they are owned by the loader 2021-10-22 18:08:09 +02:00
Bruno Windels 076f450ec7 this can be const 2021-10-22 18:01:26 +02:00
Bruno Windels 6d8ec69a4d fix lint 2021-10-22 18:01:17 +02:00
Bruno Windels b7e3a54e15 remove now usused code 2021-10-22 17:51:00 +02:00
Bruno Windels 2943cb525f add comment about possible future optimization 2021-10-22 17:50:45 +02:00
Bruno Windels 1278288a42 cleanup RoomKey to changes and better naming 2021-10-22 17:50:30 +02:00
Bruno Windels 66a93ee108 adapt Session and RoomEncryption to megolm/Decryption API changes 2021-10-22 17:48:53 +02:00
Bruno Windels ac23119838 convert SessionDecryption to TS and adapt to use KeyLoader 2021-10-22 17:48:35 +02:00
Bruno Windels b55930f084 convert ReplayDetectionEntry to typescript 2021-10-22 17:47:29 +02:00
Bruno Windels d6e243321b convert megolm/Decryption to typescript and adapt to KeyLoader 2021-10-22 17:46:39 +02:00
Bruno Windels 2ddb3fbf72 cleanup 2021-10-22 17:45:55 +02:00
Bruno Windels 77d10c93d6 convert groupby and megolm decryption utils to typescript 2021-10-21 14:40:51 +02:00
Bruno Windels 66a77519d7 implement key caching in KeyLoader
merging session cache into it so we can better manage and recycle
keys without exposing too low-level public methods on BaseLRUCache.

Using refCount instead of inUse flag as a key can of course be used
by multiple useKey calls at the same time.
2021-10-21 11:12:54 +02:00
Bruno Windels 3bafc89855 remove unused draft code 2021-10-20 15:25:11 +02:00
Bruno Windels 4fa285e85a convert LRUCache to ts 2021-10-20 15:24:58 +02:00