This changes the way how the last event is stored
for each room. It is now stored next to the
room event itself in the rooms box and no longer
stored like a room state. This way we need to
bump the database version which will cause an
inital sync for the client. Be aware of this when
updating the SDK!
This fixes several problems with current soft logout
handling, as it now stores the refresh token correct and
only refreshs it 1 minute in advance instead of 5
minutes.
We need to ensure the room summary and members are set to the expected
values, since otherwise these tests will try to fetch the current
members and then break our expectations.
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.
dynamic.copy returned a type
error so I reverted the previous
change of the copyMap
method to an extension. Also
I found out that we have used
two copyMap methods in the
SDK which did exactly the same.
I deleted the old one and
changed the tests.
BREAKING CHANGE: This replaces the old dehydrated devices
implementation, since there is no way to query what is supported easily
and supporting both would be complicated.
fixes https://github.com/famedly/matrix-dart-sdk/issues/1579
This changes the behavior
of the markdown method to
only convert linebreaks inside
of p blocks. I found no better
solution yet for the problem
as otherwise also lists
will have linebreaks between
the list items. Unfortunately
the default linebreak syntax
seems not to fulfill our needs.
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.
Removes two test cases in the markdown test which do not work anymore.
Reason for this is that just parsing a word inside of $$ word $$
katex is not valid anyway because katex is only made for mathematical
things. So the output is undefined behavior anyway.
Without this, when new rules are added with new conditions, we would
always match on them. This would mean all messages now notify. It is
better to skip them instead.
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.
fix: implement activeGroupCallEvents to get all active group call state events in a room
refactor: move staleCallChecker and expires_Ts stuff to an extension on Room, instead of Voip because it makes much more sense per room rather than on voip, also makes testing easier
fix: populate local groupCalls list on instantiating VOIP()
fix: starting stale call checker is now handled by the sdk itself because clients can forget to do so
This deprecates the displayname
getter in favor of the new
getLocalizedDisplayname which
gets the default localization
by default so it can be
called without defining localizations. It adds a method
to calculate if a room is an
abandoned DM room where
it is made sure that the room
is actually empty.
The workaround was from the
time when we have used
sqflite or when Hive had
bugs. But now HiveCollections
already supports transactions
in Dart zones and concurrent
write operations shouldn't
be a problem anymore.
This makes it possible to pass cache
and getFromRooms variable in
fetchOwnProfile. It also removes the
never working and duplicated
check from rooms. The Profiles
can be duplicated in the Set
because they are equal but not
the same objects. In the get
profile method, it now checks the
cache first before the rooms as
the cache might have the more
accurate result.
This makes displaying an avatar
change much easier as it makes
it possible to just disable cache
then.
In order to allow key sharing with
unknown devices (master key has been
verified but this device is not
signed by this master key) the
user should at least be informed.
This makes it possible to set
in the client constructor whether
the app should share keys with
unverified devices or unknown
devices.
- migrated to more useful MSC directory structure
- migrate Widgets API into new structure
- add recent emoji API into new structure
The recent emoji API is non-standard and should be compatible with Element.
Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
refactor: Make MatrixFile final and move all image calculation into isolate
Closesfamedly/fluffychat#863
See merge request famedly/company/frontend/famedlysdk!972
This makes all fields in a MatrixFile final and
the object therefore stateless. It also moves
all calculations into the isolate. After some
benchmarks it seems that this does not
really speed up the thumbnail creation
but it does no longer block the UI for
some seconds.
There are a few ways to fix this. We could skip events, where we don't
have the state in memory yet or always do a /profile request and cache
that.
I chose to go with loading the event from the database if necessary. If
we have a room in the db, we should have our memberevent in the db. In
some cases we might not (if the server thinks our memberevent is super
redundant), but I think the spec doesn't really allow that and it
doesn't happen in practice. And even if it would, we probably would want
our member event ASAP. And if we have no rooms, we fetch it from the
server as before instead of constructing a member with an MXID as the
username.
fixes https://gitlab.com/famedly/company/frontend/frontend-issue-inbox/-/issues/65
Reactions are triggering push
notifications and should therefore
be displayed as last events
in the room list of a client.
The body should just display
the reaction key.
This fixes that rooms with
new reactions can't set to
read.
The redaction events should not
be displayed in the GUI but it
is the job of the app to hide
them from the timeline while
the SDK should offer an
accurate list of ALL timeline
events by default.
Please note that this does not implement *modifying* widgets,
as this requires a full implementation of the Matrix Integration Manager
API first. This is to be done later.
Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
- By using [package:image](https://pub.dev/packages/image), the
`MatrixImageFile` was given automatically generated width and heigth.
- Moreover, `MatrixImageFile` was given a factory to create the image
file from a given maximal dimension.
- When sending images without explicitly providing a thumbnail, the
thumbnail is automatically generated based on the provided image.
- The blur hash in generated automatically based on the provided image.
Fixes:
https://gitlab.com/famedly/company/frontend/famedly-web/-/issues/162, https://gitlab.com/famedly/fluffychat/-/issues/756
Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
I think the commit which broke it was this: e3bd0cf1 It makes sure that only important state events get cached and room member events are not important state events and so new invites have no room member events cached. It makes sense to also allow room member events here to always be cached as they are special typed.
If we dump all state events from sync into memory then we needlessly
clog up our memory, potentially running out of ram. This is useless
as when opening the timeline we post-load the unimportant state events
anyways. So, this PR makes sure that only the state events of post-loaded
rooms and important state events land in-memory when processing a sync
request.
Previously we stripped all spaces off of the recovery when decoding it,
so that we could format the recovery key nicely. It turns out, however,
that some element flavours also format with linebreaks, leading to the
user having to manually remove them. We fix this by just stripping *all*
whitespace off of the recovery key.