Bruno Windels
3d5a733267
split up _devicesForUserIds to reuse with different outdated criteria
2022-11-10 17:51:40 +01:00
Bruno Windels
c78bed846e
create unknown userIdentity when processing /keys/query response
...
this can happen when the room isn't tracked yet, which is a use case
we add support for in the next commit to verify senders that we don't
know about yet (e.g. when the room isn't tracked).
2022-11-10 17:28:18 +01:00
Bruno Windels
31579b4945
when tracking room, check roomId isn't on user we shouldn't share with
2022-11-10 17:26:50 +01:00
Bruno Windels
860f435855
log session afterSyncCompleted with normal log level
2022-11-10 17:26:21 +01:00
Bruno Windels
47d557b38d
expand comment how to handle race here
2022-11-10 17:20:59 +01:00
Bruno Windels
f18aac017a
Merge pull request #819 from Kaki-In/recalculate_dm
...
Deleting leaving Heroes
2022-11-04 09:29:00 +00:00
Bruno Windels
cc70d44752
Merge pull request #913 from vector-im/bwindels/verify-unfetched-roomkey-senders
...
Verify unfetched roomkey senders
2022-11-04 09:04:41 +00:00
Bruno Windels
6c73c31735
take any decryption result, as it might now have a device to verify with
2022-11-03 17:32:01 +01:00
Bruno Windels
dd7bbe89ac
put detached logs in correct log item
2022-11-03 16:37:53 +01:00
Bruno Windels
dfede83c0b
log verifying senders in own item
2022-11-03 16:37:38 +01:00
Bruno Windels
2582600249
await operation, otherwise it keeps running during next sync
2022-11-03 16:37:20 +01:00
Bruno Windels
25c8f1cf04
always return a promise from this method, even if nothing to verify
2022-11-03 16:36:31 +01:00
Bruno Windels
cd5343414a
fix lint
2022-10-28 17:16:32 +02:00
Bruno Windels
6123d794da
also fetch unknown sender keys after decrypting entries outside of sync
2022-10-28 16:55:36 +02:00
Bruno Windels
dc25f96e73
update observed events as well
2022-10-28 16:55:20 +02:00
Bruno Windels
218d25d973
fix typo
2022-10-28 16:50:01 +02:00
Bruno Windels
d0122d17c0
don't assume timeline is open as have an await since last check
2022-10-28 16:49:33 +02:00
Bruno Windels
6dbcd46d80
cleanup of ctor
2022-10-28 16:31:00 +02:00
Bruno Windels
fcb1546fba
fetch keys as part of afterSyncCompleted step
...
remove needsAfterSyncCompleted step as well, performance difference
should be neglible
2022-10-28 16:25:31 +02:00
Bruno Windels
9c13b2b4a4
add method to fetch missing sender keys
2022-10-28 16:09:03 +02:00
Bruno Windels
c544819b42
rename and refactor method to verify locally known senders a bit
...
to differentiate with method to come for verifying senders that need to
be fetched still, and also allow reuse of verification logic by said new
method.
Also get rid of roomTracked flag in DecryptionResult as once we fetch
unknown senders (in commit to come), we should now always have a device,
unless the device isn't known on the server,
in which case we should shout.
2022-10-28 15:35:31 +02:00
Paulo Pinto
ad02c1625f
Encode SSO redirect URL as it may contain multiple query parameters
...
If the returnURL contains multiple query parameters (e.g. http://localhost:3000?foo=bar&bar=baz ), the homeserver would fail to correctly parse the URL, and only the first query parameter would be kept.
This is not an issue with the homeserver since the URL cannot be parsed in an unambiguous way, as the resulting URL would be:
https://example.com/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:3000?foo=bar&bar=baz
It's not possible to know whether the bar parameter is part of the "parent" URL, or part of the redirectUrl parameter.
----
To fix this, we now encode the redirectUrl parameter, which results in:
https://example.com/_matrix/client/r0/login/sso/redirect?redirectUrl=http%3A%2F%2Flocalhost%3A3000%2Fparent.html%3Ffoo%3Dbar%26bar%3Dbaz
This URL is correctly parsed by synapse.
2022-10-27 15:42:24 +01:00
Eric Eastwood
9ad5dd752c
Make no content PL fallback to 0
( #863 )
...
Make no `content` PL fallback to `0`. A valid PL event will have `content` but when you're just stubbing a PL event with an empty object `{}`, it doesn't need to exist and we can just as easily fallback to `0` PL level.
Split off from https://github.com/vector-im/hydrogen-web/pull/653
Changes necessary for https://github.com/matrix-org/matrix-public-archive/pull/57
2022-10-17 15:59:24 -05:00
Eric Eastwood
b4f4636555
Clarify that we no-op because if it's already aborted, that's what we wanted to do anyway ( #861 )
...
Split off from https://github.com/vector-im/hydrogen-web/pull/653
2022-10-17 15:56:34 -05:00
Bruno Windels
d37965ef91
return promise from _createSessionAfterAuth
2022-10-14 20:08:26 +02:00
Bruno Windels
4d5f202d94
Merge pull request #889 from vector-im/login_with_access_token
...
Add abiity to setup session immediately after registration without using /login
2022-10-14 08:54:52 +00:00
Bruno Windels
1f8a591cf6
dont need extra log depth
2022-10-14 10:28:42 +02:00
Bruno Windels
f46d2c1bf5
make startWithFinishedRegistration more broadly useful
2022-10-14 10:17:32 +02:00
RMidhunSuresh
dcba6d1500
Split method
2022-10-11 18:05:54 +05:30
RMidhunSuresh
a448c0218d
Fix missing semicolon
2022-10-11 18:01:54 +05:30
RMidhunSuresh
1f764664c9
Expose homeserver from Registration object
2022-10-11 17:58:33 +05:30
RMidhunSuresh
85a9a019c8
Don't inhibit login
2022-10-11 17:58:07 +05:30
R Midhun Suresh
8ef163353a
Merge pull request #793 from ibeckermayer/ibeckermayer/ts-conversion-observable-map
...
Typescript conversion for `src/observable/map`
2022-10-10 11:31:25 +05:30
RMidhunSuresh
1898c4892e
Specify return type
2022-09-12 23:44:51 +05:30
RMidhunSuresh
88091622db
Rename variable
2022-09-12 23:21:55 +05:30
RMidhunSuresh
2d4b6b0341
Exctract into function
2022-09-12 17:22:10 +05:30
R Midhun Suresh
ca4f6d83f9
Merge pull request #850 from vector-im/fix-798
...
Perform forced logout when access token is invalidated
2022-08-26 16:31:06 +05:30
RMidhunSuresh
216c5da386
Implement forced logout
2022-08-22 21:59:33 +05:30
RMidhunSuresh
d6cea6fc5c
Extract method to function outside class
2022-08-19 16:36:21 +05:30
RMidhunSuresh
34dd7e4fa5
Remove code
2022-08-19 16:31:48 +05:30
RMidhunSuresh
bfd54f2764
Delete localstorage on logout
2022-08-09 23:11:02 +05:30
Isaiah Becker-Mayer
b33db1df36
refactors ObservableMap
2022-08-07 21:12:59 -07:00
Kaki In
f812519187
Merge branch 'vector-im:master' into recalculate_dm
2022-07-29 16:29:02 +02:00
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
Bruno Windels
cb0ac846c7
remove obsolete comment
2022-07-29 16:22:01 +02:00
Kaki In
69871ab985
Merge branch 'vector-im:master' into recalculate_dm
2022-07-29 12:08:33 +02:00
Bruno Windels
2a5e0302dc
Merge pull request #785 from vector-im/hs/log-when-storage-access-fails
...
Log the error when we can't get storage access
2022-07-29 09:47:58 +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
d3e93196e3
Merge pull request #777 from ibeckermayer/ibeckermayer/ts-conversion-loginviewmodel
...
TS conversion for `LoginViewModel`
2022-07-29 09:27:10 +00:00