This is not working as expected.
As far as I can see there is no
way to do this with the http
package for now. Only way would
be to switch to dio. Not sure
if we want to do this.
This adds a check before the storeRoomUpdate() call
if the room is actually known. This has the effect
that the call of forgetRoom() is skipped.
The reason for this is an edge case in the database
implementation when calling getAllKeys(). This
somehow can corrupt the keys-cache and lead to
some problems. I wasn't able to fix this problem
yet so this refactoring is more a good-enough
workaround for now to not trigger it on an
initial sync. I plan to fix it with a different
approach which completely removes the keys-cache
in the future.
However this change leads to some problems in the
tests as they already rely on this edge case.
This also makes sure that
room account data does not
get unnecessarily serialized
and deserialized before
storing it in the database.
For this it changes the
code flow at multiple
places.
This handles room ephemerals
directly and not as room
event updates, which saves
one unnecessary step to json serialize and
deserialize. Handling those
as room event updates had
no benefit anyway so this
should speed up performance.
- BREAKING: create `DatabaseApi.storeWellKnown` method
- BREAKING: create `DatabaseApi.getWellKnown` method
- add new getter `Client.wellKnown` containing cached `DiscoveryInformation`
- override `Client.homeserver` to invalidate `Client.wellKnown` in case the domain changed
- override `Client.getWellknown` to cache the resolved `DiscoveryInformation`
- add tests for well-known cache
Fixes: #1865
Signed-off-by: The one with the braid <info@braid.business>
Synapse includes the room in both sections if you have both an
invite->leave and a leave->invite transition in one sync response.
Transitions in the other order are only included once (in the leave
section) it seems, so this should work correctly in all cases.
Fixes https://github.com/famedly/product-management/issues/2283
This changes the behavior
when client init fails. It
no longer calls logout and does
only clear local data while
returning all available
information in a new
exception type so that the
SDK consumer can decide
to logout or try again to init
with these information. This
should make it much more rare
that users loose their sessions.
BREAKING CHANGE: This changes the runInRoot method to not return a
future. As a user, if you need the result of an async computation passed
to runInRoot, please await it directly. Also the KeyVerification start
and a few call methods now return a future.
You can either set them to private on the client or overwrite the
behaviour for that on each readMarker call. This also handles incoming
thread receipts and tries its best to figure out what is the latest
receipt. This however breaks the old m.receipt account data event.