Commit Graph

459 Commits

Author SHA1 Message Date
Christian Pauly 7885281c72 refactor: Use import sorter and ci templates 2022-07-21 15:44:04 +02:00
Krille Fear 50ef19b8a8 Merge branch 'isabella/create-chat-with-powerlevel' into 'main'
Isabella/create chat with powerlevel

See merge request famedly/company/frontend/famedlysdk!1078
2022-07-14 08:32:39 +00:00
Nicolas Werner 6e211f5a81 fix: race conditions in the SDK and its tests 2022-07-13 00:36:49 +00:00
Isabella Hundstorfer 2e649fdcf9 Add powerLevelContentOverride to startDirectChat and createGroupChat 2022-07-12 12:55:11 +02:00
Christian Pauly 7e06d0f578 fix: Cache user profile even with cache=false when there is a cache 2022-07-11 10:48:22 +02:00
Christian Pauly ff359aedff refactor: Better fetch own profile
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.
2022-07-11 08:08:40 +02:00
Krille Fear 2a280cec98 Merge branch 'krille/share-keys-with-unknown-devices' into 'main'
feat: Calc encryption health state and allow key sharing with unknown devices

Closes #307

See merge request famedly/company/frontend/famedlysdk!1072
2022-07-09 07:50:32 +00:00
Christian Pauly 28231936b1 feat: Calc encryption health state and allow key sharing with unknown devices
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.
2022-07-09 09:39:31 +02:00
Krille Fear c070a7ed40 Merge branch 'krille/refactor-handle-ephemerals' into 'main'
refactor: Handle Ephemerals method

Closes #306

See merge request famedly/company/frontend/famedlysdk!1064
2022-07-08 16:20:51 +00:00
Christian Pauly 211c366662 refactor: Use tryGet in handleRoomEvents 2022-06-30 15:33:20 +02:00
Christian Pauly 5b831fcc83 refactor: Handle Ephemerals method
This makes sure that the handle
ephemerals method becomes fully
type and null safe, does not handle
maps directly anymore and stores
the corresponding fake m.read
room account data only once
per sync.
2022-06-30 09:39:34 +02:00
Christian Pauly 9628095ac9 feat: Implement CachedStreamController
This makes it possible to access the last
value of a stream at any time.
2022-06-30 09:22:53 +02:00
Christian Pauly 0f17fec3f4 fix: Only trigger onCall streams by latest call event for a call_id
This should fix that calls can get
started on
2022-06-29 09:00:01 +02:00
Christian Pauly c591c1d4b5 refactor: Use handleRoomEvents method instead of handleEvent
This makes it easier to update
the state by a whole timeline.
2022-06-28 14:09:12 +02:00
Christian Pauly fc229c5715 refactor: Pass BasicEvent to handleEvent instead of JSON 2022-06-28 14:09:12 +02:00
Christian Pauly c4cdf6ab4e refactor: Call handleEphemerals with BasicRoomEvent instead of dynamic 2022-06-28 14:09:12 +02:00
Christian Pauly a1c6bc7551 refactor: Let _handleRoomEvents use BasicEvent
This is the first step to reduce
the use of pure json in the
sync method.
2022-06-28 14:09:12 +02:00
Duan Weiwei e2efa3e758 Support group call. 2022-06-13 15:26:25 +00:00
Christian Pauly 58cfd1f688 refactor: Rename methods and get rid of all Future getter 2022-06-08 08:30:05 +02:00
Christian Pauly b00b1636d1 fix: Do not show seen events in push notification 2022-06-07 16:34:07 +02:00
Christian Pauly 4692c95910 feat: Allow overriding supportedVersions 2022-06-07 08:53:08 +02:00
Henri Carnot 2d018d3d5f feat: added waitForSync method 2022-05-25 10:53:52 +00:00
Lanna Michalke dd76e652bf fix: buggy e2e test
Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
2022-05-23 14:40:19 +02:00
Lanna Michalke 039062bfdf feat: implement session export
- implement session export
- implement session import

Please note, this is not device dehydration but a fully offline session
dump eligible for e.g. TOR users.

Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
2022-05-23 12:06:31 +02:00
Krille Fear 3f3d4d38d6 refactor: Migrate to Matrix Api Lite 1.0.0 2022-05-17 22:50:04 +00:00
Henri Carnot bfdd4c810e Henri/fragmented timeline v2 2022-05-16 10:54:42 +00:00
Krille Fear 9a87850092 Revert "feat: non cached fragmented timeline"
This reverts commit 09b324674e
2022-05-12 09:46:29 +02:00
Christian Pauly ac293c29c6 chore: Move auth object passing to external msc implementations 2022-05-09 14:32:08 +02:00
Nicolas Werner 907a0d2317 feat: Store timestamp in the presence events
This fixes the presence never being accurate in the app.
2022-05-06 13:04:31 +02:00
Henri Carnot 09b324674e feat: non cached fragmented timeline 2022-05-03 14:08:33 +00:00
Lanna Michalke ac16724841 chore: make Client.accountData read-only
- for external access, Client.accountData should be read only
- added corresponding getter and private Map

Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
2022-05-03 03:29:20 +02:00
Christian Pauly bce45cbf2b refactor: Remove old deprecations
They have been lived long
enough and the next version
will have breaking changes
anyway.
2022-04-22 12:44:45 +02:00
Christian Pauly eefc40e2d0 refactor: Get rid of dynamic input in checkHomeserver
This also fixes the automatic
homeserver detection in the
login method. It no longer uses
the deprecated user.
2022-04-21 15:40:21 +02:00
Christian Pauly b7e0d10b5a fix: Wait for keys in pusher 2022-04-14 19:44:19 +02:00
Christian Pauly 5973e629fe feat: Get event from push notification 2022-04-14 17:01:05 +02:00
Krille Fear e97fe621d6 chore: Allow custom image resizer to be an async method 2022-04-04 14:35:23 +02:00
Christian Pauly 445252b3a5 feat: Pass through a custom image
resize function to the client

This allows the use of the
native imaging package in a more
easy way.
2022-03-30 10:35:17 +02:00
Krille Fear 23e0d29a0d Merge branch 'krille/try-again-sending' into 'main'
feat: Try again uploading file events for one minute

See merge request famedly/company/frontend/famedlysdk!986
2022-03-30 06:38:01 +00:00
Christian Pauly f86b242dcf feat: Try again uploading file events for one minute
This also refactors the code for
sending events with the same
Duration of one minute.
2022-03-25 12:54:42 +01:00
Christian Pauly abddbee24c feat: Set loglevel in client constructor
This is just more convenient than
doing it in a line after the constructor.
2022-03-25 12:12:43 +01:00
Nicolas Werner 62780b5b2f Merge branch 'krille/fix-reactions-trigger-notifications' into 'main'
fix: Dont encrypt reactions

See merge request famedly/company/frontend/famedlysdk!974
2022-03-15 10:40:52 +00:00
Christian Pauly f1d422b89a fix: Dont encrypt reactions
This fixes that server
sends notifications for reactions.
2022-03-15 08:42:53 +01:00
Nicolas Werner 83298cc98b fix: own profile containing mxid
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
2022-03-15 02:13:09 +01:00
Krille Fear 58f77cacdb fix: Rooms sort order after login
A two years old workaround prevented
the room sorting for the initial sync. But
this is definitely no longer needed.
2022-02-28 12:19:33 +01:00
Krille Fear ecc60efea9 fix: Change password using email authentication 2022-02-19 13:37:35 +01:00
Krille Fear 1f8691dd70 Merge branch 'krille/thumbnail-size' into 'main'
chore: Increase default thumbnail size to 800

See merge request famedly/company/frontend/famedlysdk!968
2022-02-19 11:16:08 +00:00
Krille Fear d780ba77c4 chore: Increase default thumbnail size to 800 2022-02-19 11:29:10 +01:00
Christian Pauly c0ec4c3990 fix: sortRooms should be triggered right before onSync is called 2022-02-18 12:11:10 +01:00
Krille Fear 6b610d0115 feat: Return homeserver summary on checkHomeserver 2022-02-16 07:07:53 +00:00
Christian Pauly 68fcee98cb fix: Show reactions as last events and refactor hasNewMessage
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.
2022-02-14 15:06:22 +01:00
Christian Pauly 843afe7aa4 fix: Sort rooms after updating the UI on web
FluffyBox behaves different on
web transactions which leads
to the result that _sortRooms()
is performed before the
rooms UI can be there. This
leads to an unsorted room list
on web.
2022-02-14 09:30:33 +01:00
MTRNord d77d49430a fix: Remove sorts that shouldnt be required. 2022-01-15 21:54:13 +01:00
Krille Fear b472dd7b92 fix: Room Member updates should always be cached
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.
2022-01-08 10:44:22 +01:00
Krille Fear 3bce8b4489 refactor: Remove unnecessary type checks and imports 2021-12-23 11:46:45 +01:00
Sorunome fa5abfca92
fix: ignore 4xx errors when re-sending the to_device queue
The to_device queue was introduced to ensure integrity if e.g. the
server temporarily failed when attempting to send a to_device message.
If, for whatever reason, the server responds with a 4xx error, though,
then we want to ignore that to_device message from the queue and move on,
as that means that something different was fundamentally wrong. This
helps to fix the to_device queue clogging up, making clients incapable
of sending to_device events anymore, should such clogging happen.
2021-12-08 13:00:53 +01:00
Sorunome e3bd0cf139
fix: Only save state events from sync processing in-memory if needed
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.
2021-12-06 11:09:50 +01:00
Krille Fear 43d5b1c523 fix: Add missing calcDisplayname global rules to client constructor
This two parameters were
already documented but
were missing in the
constructor. They can
also be final.
2021-12-03 12:34:52 +01:00
Krille Fear fe2d184faf fix: userOwnsEncryptionKeys always returns true
Actually the homeserver sends an
empty object in the deviceKeys map
so we need to check if this object
is there but is empty.
2021-11-28 10:37:56 +01:00
Krille Fear 44934d5911 Merge branch 'krille/enable-e2eerecovery' into 'main'
chore: Enable E2EE recovery by default

See merge request famedly/company/frontend/famedlysdk!915
2021-11-26 13:05:13 +00:00
Krille Fear ac06864627 feat: Migrate olm sessions on database migration
This adds a getAllOlmSessions
endpoint to the database API and
implements them in both
implementations. This also
adds it to the database
migration.
2021-11-26 08:17:43 +01:00
Krille Fear 03418bfe8b chore: Enable E2EE recovery by default
We have disabled it by default to
prevent using workarounds as
long time solutions and to not
miss bugs. But in a federated
context we can not be sure that
we all Matrix clients are ever
bug free and we have now the
onEncryptionError Stream
anyway.
2021-11-25 15:48:17 +01:00
Krille Fear 79b74e2bbf fix: Remove user avatar 2021-11-25 09:00:59 +01:00
Krille Fear ee21121a63 fix: Workaround for null boolean
deviceKeysList.outdated is not nullable but we have seen this error
in production: `Failed assertion: boolean expression must not be null`
So this could either be a null safety bug in Dart or a result of
using unsound null safety. The extra equal check `== true` should
safe us here
2021-11-23 13:53:07 +01:00
Krille Fear 3338da4e09 fix: Ability to remove avatar from room and account
To remove an avatar the
client needs to send an
empty object. This is now
possible by making the
MatrixFile parameter nullable.
2021-11-22 19:36:38 +01:00
Krille Fear 27c03b4fad fix: Request history in archived rooms
We have just forgotten to
set the prevBatch token in
the room object.
2021-11-22 10:37:26 +01:00
Krille Fear c8c4562f70 fix: Dont enable e2ee without encryption support
This also adds a missing visibility
parameter to the
createGroupChat method.
2021-11-13 11:58:07 +01:00
Krille Fear 9abe1ed81d fix: Dont enable e2ee in test verification DM room 2021-11-09 15:42:43 +01:00
Krille Fear 4cf88e2be6 feat: More advanced create chat methods
This includes a new simplified
API to create new direct and
group chats. It also handles
enabling encryption by
default.
2021-11-09 15:39:42 +01:00
Krille Fear 475e810523 feat: Make waiting on init db optional
This can improve the start-up time of apps.
The three big db reads on init are
loading account data, rooms and
device keys.
This makes it now possible to let
them run parallel
(while it may depend on platform
if this has any effect)
and the init() method can skip
awaiting them. They will
be at least awaited before handling
the first received sync.
So the app can already display the
room list before device keys are
loaded and request the first sync
from the server before anything
else is loaded from the DB.
2021-11-09 15:27:48 +01:00
Krille Fear 315ed7bdcb feat: Add more benchmarks for sync, timeline, init
This also disables benchmarks if loglevel is higher than debug.
2021-11-09 10:03:59 +01:00
Krille Fear 3e1aee6fcd fix: Null error in get own profile
On converting a User object to
a Profile object now leads to an
error. This fixes it.
2021-11-05 12:21:48 +01:00
Nicolas Werner 7d78233bf0
refactor: remove literal boolean comparisons leftover from nullsafety conversion 2021-10-28 14:40:22 +02:00
Nicolas Werner 6e20c53b01
refactor: remove redundant null checks 2021-10-28 14:32:09 +02:00
Nicolas Werner ebd5bc3d24
refactor: make room nullsafe 2021-10-28 00:54:25 +02:00
Nicolas Werner fb0a84d7b2
refactor: make client nullsafe 2021-10-25 16:34:02 +02:00
Krille Fear 9193950970 fix: Auto update room states
Room states are ignored if the event with the same event ID
is already known in the database. But
because of the event is stored in the
database and after this
setState in the Room class is called,
an event is always "known" and
therefore auto updating was broken.
2021-10-25 10:55:54 +02:00
Jayesh Nirve 77ca7523d0 refactor: remove unused clientId 2021-09-24 16:05:05 +02:00
Christian Pauly 0125272b7e fix: Autodetect mimetype on file upload 2021-09-22 07:59:45 +02:00
Krille Fear e0e09c2f67 feat: Add waitForFirstSync parameter to init method
Just using the .init() method to wait for the client
to initialize is a more easy way than listen to onLoginStateChanged.
But by default it waits for the first sync.
This should be configurable.
2021-09-20 11:41:40 +02:00
Sorunome fe9145d580 fix: missing null check 2021-09-18 07:50:45 +00:00
Jindra d8f642372e fix: missing content-type when changing avatar 2021-09-15 09:35:58 +02:00
Krille Fear 1e2ccabe85 fix: Missing null fallback when update notificationCount
Previously when using RoomUpdate in the constructor the notificationCount to update
was never null and set to 0 if it was missing. Now that we are
no longer using it, I forgot to
add the null fallback at this point.
This leads to serious crashes in the apps at runtime
and thats why I bump the version here as well!
2021-09-13 16:42:55 +02:00
Christian Pauly 00771fc209 refactor: _updateUserDeviceKeys method 2021-09-13 14:58:07 +02:00
Krille Fear 56af96c7ea fix: Get direct chat from user ID method
The method was not type safe and therefore there
was no warning that with the sortOrder changes
now DateTimes are compared which leads to
an exception in the app if not using converting to milliseconds first.
2021-09-13 13:53:37 +02:00
cloudwebrtc ea34f0b82c feat: MSC2746: Improved Signalling for 1:1 VoIP. 2021-09-10 02:50:24 +02:00
Christian Pauly e13b00d127 refactor: Make RoomUpdate class null safe by removing it
RoomUpdate came from a time where we had no data model for
SyncUpdates but now we have and therefore this class is just
code duplication. This removes the class
and uses the SyncRoomUpdate class from
the package matrix_api_lite instead.
It needed a lot of refactoring at some places
where I also have removed some unnecessary null or type checks.
2021-09-08 12:31:55 +00:00
Christian Pauly 9c1f79359e refactor: Replace all logic regarding sortOrder
The current implementation of sortOrder can be made way more easier now
by just keeping the sortOrder of the list
and the timelineFragments in the hiveStore. This needed a huge
change but mostly removes a lot of code which can be done
way more easy now. This also needed some rewriting of the setState logic and changes to
the prevEvent calculation. This solution should also be more stable.
More information:
https://www.reddit.com/r/fluffychat/comments/pfnlhq/the_sort_order_of_matrix_timelines/
2021-09-02 07:13:38 +00:00
Christian Pauly d921f38734 feat: Pin invited rooms
Invitations should always be on top of the
room list. This makes it an optional parameter now which defaults to
true.
2021-09-02 06:43:06 +00:00
Sorunome 33d31cecd1
fix: Missing chatUpdate.prev_batch != null test
We *always* have to update the in-memory prev_batch if it is non-null
2021-09-01 17:42:49 +02:00
Sorunome 56817df437
fix: missing null check
It seems `device_keys` in the reply of `/keys/query` is not required. While synapse always
sent it, conduit did not, which resulted in an error.
2021-08-27 17:22:54 +02:00
Jayesh Nirve 42614bdfbd
Merge branch 'main' of gitlab.com:famedly/company/frontend/famedlysdk into td/fix-lastevent-preview 2021-08-26 02:42:36 +05:30
Christian Pauly 5621c9bdb0 fix: sortAtTheEnd for LeftRoomUpdate was not set
This fixes a bug where requesting
history on archived room leads to a
wrong sorted timeline.
2021-08-25 11:06:26 +02:00
Christian Pauly 2f35277e47 refactor: Change name of archive getter to function
This is more intuitive because it is
a function that loads something from
the server and doesnt directly return
something.
2021-08-25 10:36:58 +02:00
Christian Pauly cec08b3775 feat: cache archived rooms to access them with `getRoomById`
getRoomById searches now in the local cache for the given room and returns null if not
found. If you have loaded the [archive] before, it can also return
archived rooms.
This should make it much easier to display
archived rooms in the client.
2021-08-25 09:52:57 +02:00
Lukas Lihotzki 9087f08775 chore: mxc url in Uri 2021-08-23 11:05:47 +02:00
Jayesh Nirve 164a95ea29 clean stuff up? 2021-08-23 07:34:57 +00:00
Nicolas Werner a4ac9eab66 cleaner conditions 2021-08-23 07:34:57 +00:00
Jayesh Nirve 38235415eb fix: lastEvent in room preview now crespects edits order 2021-08-23 07:34:57 +00:00
Christian Pauly 9b7474e2f2 refactor: Update to dart 2.12 and opt out in all files
This also adds some missing license headers, I have detected while
using license header search&replace to add the
null safety opt out
2021-08-18 08:09:39 +02:00
Christian Pauly 37cfadd7e9 fix: Add space states to important events
We need the space state events in the important events to be able to
differentiate rooms and spaces in the room list.
2021-08-17 06:47:25 +00:00
Jindřich Pikora cf441e533d refactor: rename LoginState.logged to loggedIn 2021-08-03 12:26:17 +00:00
Nicolas Werner 162436cc8d fix: accidental OTK uploads on internal fakeSync 2021-08-02 20:52:09 +02:00
Christian Pauly e8d511a371 fix: Missing null checks in syncUpdate handling 2021-07-27 10:49:50 +02:00
Lukas Lihotzki 6d6830505f refactor: implement http timeouts in this package 2021-07-26 15:33:36 +02:00
Lukas Lihotzki 8665f092f4 chore: matrix_api_lite 0.4.0 2021-07-26 14:54:22 +02:00
Lukas Lihotzki bc2dac2ecc refactor: use more specific type 2021-07-26 14:40:15 +02:00
Nicolas Werner 179f73db3a fix: Upload OTKs if the otk_count field is missing
fixes #180
2021-07-26 09:47:05 +02:00
Christian Pauly 209035ffbd refactor: Use official Dart isolates
The isolates package is discontinued and not compatible
with the newest Dart version.
dart:isolate is not an option because importing this
library makes it impossible to run the matrix
SDK on dart web native. It just won't
build. So we now just depend on
that the flutter app pass through the compute method.
2021-07-21 12:34:43 +02:00
Sorunome cd5131daa5
fix: Add locking to sending encrypted to_device messages to prevent potential race conditions
Due to chunked lazy sending of megolm sessions it was in theory that we encrypted two olm
messages to the same device in different futures out-of-order. Introducing locking here should
fix this (increadibly rare, so far only theoretical?) race-condition
2021-07-11 13:06:39 +02:00
Sorunome e86353a412
fix: Provide a reasonable well-known fallback
If the well-known look fails (not json, 404, etc.) we should assume a
reasonable fallback (domain part with https prepended). As clients are
expected to call Client.checkHomeserver on the resulting domain anyways
we can safely assume this default, as it is still validated, if there
is actually a matrix homeserver running on that endpoint.
2021-07-11 12:26:48 +02:00
Christian Pauly 535a3b1d70 feat: Make it possible to get the current loginState
You may have missed the last valid loginState from the stream if you
listen too late to it. This makes it possible to
get always the current loginState.
2021-07-06 12:25:00 +00:00
Sorunome b664640a05
fix: Don't run syncs while the client is being initialized
Fixes that a sync could be done / processed while the client was still being initialized (loaded from database). This has lead to multiple bugs, such as the verified status of keys getting lost, notifications that come in during app startup displaying oddly, etc.

Additionally, the init lock was released too early; it is now released when the init is actually done.
2021-06-25 13:26:23 +02:00
Christian Pauly 768b0623da feat: Implement sync status stream
This new sync status stream gives the current status of the sync to make it possible
to display in the UI where the sync currently hangs and
what the progress is while updating 1000 rooms. So the app can display a
progress bar.
2021-06-20 15:59:59 +02:00
Christian Pauly a7ffe4835d feat: Also migrate inbound group sessions
For users who do not use the chat backup this could be useful.
2021-06-19 11:03:52 +02:00
Christian Pauly 69b52ba85b refactor: Move pedantic to dev_dependencies
The unawaited method from the pedantic package was a historic solution
for the case that you dont want to await a future in an async function.
But now we can do this with just a comment which
is the recommended way to do this now.
This makes it possible to have pedantic as a dev_dependency which means just one dependency less.
2021-06-18 10:15:59 +02:00
Christian Pauly c0c7f68bf3 chore: Rename to matrix 2021-06-18 09:58:25 +02:00
Christian Pauly 38d81d6093 fix: Migrate missing device keys
Currently we only migrate the client and SSSSCache but this leads to the
problem that we are no longer self signed after the migration.
We need to migrate all device keys too.
This also abstracts the migration code in a method. init() is too large already...
2021-06-18 09:16:12 +02:00
Christian Pauly 28dc8b4ff0 refactor: Improve clearing
This makes sure that the database is null after clearing so it will
be built again using the databaseBuilder.
Also this makes sure that the sync has
aborted BEFORE the clearing starts to
get rid of some warnings in the logs.
2021-06-14 11:00:41 +02:00
Christian Pauly fe06b96e93 fix: Do not logout before migration
Before the migration of the databases starts there is always a
logout signal sent. This was wrong.
This also cleans up the logs a little bit
and removes the useless parameters for the second init() call
because those are going to come from the new database anyway.
2021-06-14 08:29:03 +02:00
Christian Pauly 967712adfe feat: Implement database migration
This allows the user to give a legacyDatabaseBuilder to the client object
and in the init proccess the client checks by itself if there is old data in the legacy
database. If yes then it migrates them and
then deletes the old database. This uses the database_api and is agnostic to
the database implementation.
2021-06-11 10:10:18 +02:00
Christian Pauly 26261ecd5e feat: Add fromJson method for Room
This also included to move the room summary to a dedicated object inside
of the Room object because so it is easier to convert this to and from json.
2021-06-01 12:54:16 +02:00
Christian Pauly c3d47b16c6 CI: Use correct image 2021-05-25 10:46:34 +02:00
Christian Pauly c66e35c16c refactor: Create a clean database API 2021-05-20 07:36:03 +00:00
Christian Pauly d1b76b01c4 fix: Try clear and try close database 2021-05-17 14:36:10 +02:00
Christian Pauly bb9a8ff7e9 fix: SdkError Exception can be anything so should be dynamic 2021-05-17 14:17:46 +02:00
Nicolas Werner 6f52c0e2c3 fix: Allow SDK users to delete the db after logout 2021-05-17 07:38:53 +00:00
Lukas Lihotzki c196610998 chore: operation names from OpenAPI spec 2021-05-12 13:56:16 +02:00
Lukas Lihotzki b4f755388a refactor: high-level loops 2021-04-19 18:58:59 +02:00
Christian Pauly ffef732103 refactor: enable more linter rules
enable prefer_final_locals and prefer_final_in_for_each linter rules
2021-04-14 10:29:29 +02:00
Christian Pauly fb0177ac5f feat: Implement spaces 2021-04-12 09:24:20 +02:00
Lukas Lihotzki 2a2a170609 refactor: upgrade http package 2021-04-01 13:43:24 +02:00
Lukas Lihotzki 08043c06f4 refactor: high-level loops 2021-04-01 12:51:45 +02:00
Krille Fear 9bef8452d3 docs: Clean up dart documentations
Changing to `code` blocks where it cant be resolved to [stuff] things.
2021-03-16 12:32:21 +00:00
Christian Pauly 97daae3419 refactor: Update to matrix_api_lite 0.2.0
This introduces a minor breaking change in the login method.
It now uses correctly the AuthenticationIdentifier
and deprecates the user, medium and address parameter.
2021-03-09 19:14:53 +01:00
Krille Fear 57fde98fec Merge branch 'soru/less-sql-statements' into 'main'
chore: Reduce needed database accessess

See merge request famedly/famedlysdk!666
2021-03-09 18:12:40 +00:00
Sorunome c76dc0daa2
chore: Reduce needed database accessess 2021-03-09 18:28:58 +01:00
Christian Pauly 1f8285c3e7 refactor: Room states 2021-03-09 17:28:55 +00:00
Krille Fear 44ca96e544 refactor: Update pedantic
This enforces to NOT use curly braces in Strings where not needed
and not await non-future variables.
2021-03-09 17:28:04 +00:00
Krille Fear 0d8bddf708 Merge branch 'soru/fallback-keys' into 'main'
feat: Add fallback keys support

Closes #136

See merge request famedly/famedlysdk!653
2021-03-03 07:38:32 +00:00
Sorunome 498c7825a5
feat: Add fallback keys support 2021-03-02 16:17:32 +01:00
Sorunome 885141968c Merge branch 'krille/refactor-event-update' into 'main'
refactor: Deprecate eventType in EventUpdate

See merge request famedly/famedlysdk!661
2021-02-26 16:11:57 +00:00
Christian Pauly c9d3c327f6 refactor: Deprecate eventType in EventUpdate 2021-02-26 13:06:02 +01:00
Christian Pauly 29d0e673e0 fix: Sync error handling 2021-02-24 09:17:41 +01:00
Christian Pauly 72a7bc1637 feat: Implement upload sync filters 2021-02-18 14:03:58 +01:00
Christian Pauly c7f78bdaf5 fix: Dont catch sync errors 2021-02-18 13:01:13 +01:00
Christian Pauly fc8563849a feat: Custom Exception and return type for Change Homeserver 2021-02-13 09:08:56 +01:00
Sorunome fcb8d48bd7
feat: Add command parser 2021-02-09 18:19:38 +01:00
Christian Pauly d362d6db23 fix: Request history on limited timeline 2021-02-09 15:02:48 +01:00
Krille Fear 1154bc3606 Merge branch 'soru/replay-to-device' into 'main'
fix: Add to_device queue to prevent olm session corruptions

Closes #141

See merge request famedly/famedlysdk!640
2021-02-09 08:24:21 +00:00
Sorunome d373a06aa2
fix: Add to_device queue to prevent olm session corruptions 2021-02-08 14:57:19 +01:00