* #22606 Fix "Remove" button to users without "m.room.redaction" permission
This change makes the remove button NOT available to users without permissions
* Fix lint
Signed-off-by: Rashmit Pankhania <rashmitpankhania@gmail.com>
---------
Signed-off-by: Rashmit Pankhania <rashmitpankhania@gmail.com>
* `getOwnDeviceKeys`: use `olmMachine.identityKeys`
This is simpler, and doesn't rely on us having done a device query to work.
* Factor out `requestKeyBackupVersion` utility
* Factor out `makeMatrixHttpApi` function
* Convert `initRustCrypto` to take a params object
* Improve logging in startup
... to help figure out what is taking so long.
* Fix typo in jest CI
Caused versions to clobber each other's LCOV
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Move sonarcloud shard support into reusable workflow
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Send authenticated /versions request
Implements [MSC4026](https://github.com/matrix-org/matrix-spec-proposals/pull/4026).
I believe this probably is as simple as this: it will mean that the versions
response can obviously change after logging in, but since the client is
constructed again with an access token, this should just work (?)
A remaining question is whether this needs to be optional. Opening the PR
to prompt the discussion. Apps might not expect it, but it's just the same
auth that we're sending to other endpoints on the same server.
* Fix tests
* Clear /versions cache on access token set
* Remove m.thread filter from relations API call
We used MSC3981 to pass the recurse param to the /relations
endpoint so that we could get relations to events in a thread, but
we kept the rel_type filter on (as m.thread) so no second-order relations
would ever have been returned (a nested thread isn't a thing).
This removes the filter and does some filtering on the client side to
remove any events that shouldn't live in the threaded timeline (ie.
non-thread relations to the thread root event).
This should help fix stuck unreads because it will avoid the event that
the receipt refers to going missing (but only on HSes that support MSC3981).
For https://github.com/vector-im/element-web/issues/26718
* Fix import cycle
* Remove params from expected calls in tests to match
* Unused import
* Comment explaining the purpose of RoomList
* Fix incorrect return type declaration on RoomList.getRoomEncryption
* Move RoomList out of MatrixClient, into legacy Crypto
* Initialise RoomList inside Crypto.init to allow us to await it
* initial commit
* new interation test
* more comments
* fix test, quick refactor on request version
* cleaning and logs
* fix type
* cleaning
* remove delegate stuff
* remove events and use timer mocks
* fix import
* ts ignore in tests
* Quick cleaning
* code review
* Use Errors instead of Results
* cleaning
* review
* remove forceCheck as not useful
* bad naming
* inline pauseLoop
* mark as paused in finally
* code review
* post merge fix
* rename KeyDownloadRateLimit
* use same config in loop and pass along
A method that we use for fetching recursive related events on homeservers
without MSC3981 support injects events into the timeline in timestamp
order using a special method on event-timeline-set. Injecting events using
this method could cause on-screen notifications because it incorrectly set
the 'liveEvent' flag to true if the events were added tio the live timeline.
These events are never live though as the point is that we're fetching them.
* don't back up keys that we got from backup
* lint
* lint again
* remove key source struct and add function for importing from backup
* apply changes from review
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Test whether an event not in a room's timeline causes notification count increase
Commited separately to demonstrate test failing before.
* Don't fix up notification counts if event isn't in the room
As explained by the comment, hopefully.
* Fix other test