Commit Graph

618 Commits

Author SHA1 Message Date
td cd94cf62a8
chore: merge api_lite and dart sdk 2024-03-25 17:22:05 +05:30
Krille e266ef7312
refactor: Switch to MatrixSdkDatabase as suggested database and deprecate other ones 2024-03-22 16:05:08 +01:00
Krille b90b902218
refactor: BREAKING Migrate database to new lastEvent storage method
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!
2024-03-18 14:11:15 +01:00
krille-chan 20073ddd49
refactor: Store lastEvent in room object instead of room state 2024-03-18 13:18:36 +01:00
td a60a0cad69
fix: throw EventTooLarge on exceeding max fed PDU 2024-03-14 01:18:10 +05:30
Krille d049e667ee
refactor: BREAKING Allow calling init when in soft logout state and fix some bugs
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.
2024-03-07 15:49:23 +01:00
Romain GUILLOT 22df8b39a8
feat: add fromLocalStoreOnly to Event.downloadAndDecryptAttachment
Signed-off-by: Romain GUILLOT <romain.guillot@arche-mc2.fr>
2024-03-06 12:13:07 +01:00
Nicolas Werner cf4a2c7929
fix: some tests fail with the "fixed" membership fetch logic
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.
2024-03-04 19:33:47 +01:00
Nicolas Werner 69fe7845a9
chore: Add regression test for invite->join state handling
This is a reduced test case which made me investigate the issue and is
fixed by the previous few commits.
2024-03-04 17:58:39 +01:00
Krille 65c56f3630
feat: Store accesstokenExpiresIn and call softlogout 5 minutes before 2024-02-23 13:06:38 +01:00
Krille 38b1eb75e5
feat: Implement handling soft logout 2024-02-23 13:06:38 +01:00
td aa77812e8e
fix: ignore expired calls rather than killing them 2024-02-14 03:27:09 +05:30
Krille 4906ae02cf
feat: Add missing localizations for key verification messages 2024-01-22 12:49:27 +01:00
krille-chan a9508d8941
refactor: Throw client init exception on client init fail
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.
2024-01-05 09:46:38 +01:00
Krille 40565464e0
fix: Delete in transaction on new store does not clear cache correctly 2024-01-02 10:01:33 +01:00
Krille aa2b010155
ci: Test that database can write and read at least 5mb of data
This does not yet test on
Android but at least makes sure
that this problem does not
occur when using future
databases.
2023-12-27 10:33:27 +01:00
td dc411c9b14
fix: validate account_data values instead of checking them in syncUpdates 2023-12-20 21:10:31 +05:30
td b6d5ce02c4
feat: add tests for calls 2023-12-19 21:55:30 +05:30
td 6a2f31de39
fix: ignore calls with age older than lifetime
feat: add barebones WebRTCDelegateMock
2023-12-18 21:28:26 +05:30
Krille d8ec1601a3
ci: Test all databases in unit tests 2023-12-15 14:24:00 +01:00
Krille 9dc2f825a3
refactor: Add loadHeroUsers method
This makes it possible to await loading the
hero users to correctly
calculate displayname and
avatar.
2023-12-14 09:16:52 +01:00
Krille eb869462aa
refactor: Add delete database method
This adds a delete database
method used for migration to
correctly delete the whole
legacy database instead just
empty it.
2023-12-12 12:57:23 +01:00
Krille c3c770bc33
refactor: Remove duplicated copyMap method and fix type error
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.
2023-12-11 10:29:06 +01:00
Christian Pauly 6db019ae23
feat: Implement new Matrix Dart SDK Database
fix: Edit last event breaks db

feat: Add native sqflite indexeddb database

feat: Split up preload and nonpreload room state boxes
2023-12-06 12:11:47 +01:00
Nicolas Werner 2fca08725d
feat: Update dehydrated devices implementation to current MSC
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
2023-11-28 11:02:35 +01:00
Krille 06669cbcac
refactor: Store fetched presence in db and deprecate own cache 2023-11-27 15:48:21 +01:00
Krille 029b648f26
fix: Do only convert linebreaks to br tags in p blocks
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.
2023-11-22 11:02:17 +01:00
Nicolas Werner 642bb7e62a
fix: in memory database is not actually in memory
Since we can't pass the fake filesystem to hive, instead we just store
the database in a temporary directory.
2023-11-21 14:30:34 +01:00
Nicolas Werner f72d298a0b
fix: database tests group can't be async 2023-11-17 13:05:14 +01:00
Nicolas Werner 8b8a647cf9
chore: enable discarded_futures lint
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.
2023-11-17 12:59:27 +01:00
Nicolas Werner a0970b7fcb
chore: don't manually enable default rules 2023-11-17 12:59:20 +01:00
Krille 8cc863b1a3
feat: Store presences in database 2023-11-15 06:59:58 +01:00
td 1ab06cb01a
fix: clear local database on logout even if server timesout 2023-11-13 18:12:47 +05:30
Nicolas Werner 82492f92e1
chore: upgrade lints 2023-11-02 10:20:33 +01:00
Krille 6f144198b7
fix: Do not convert linebreaks in pre blocks on markdown parsing 2023-10-23 08:39:26 +02:00
Krille 4e310f16d5 feat: Add methods to load all room keys from online key backup
This makes it possible to load
and sync all room keys
right after the bootstrap if the
app wants to do this.
2023-10-20 12:13:12 +02:00
Krille 5c3c85ba3d
refactor: Trigger upload keys on sync and not in background job and upload them before logout 2023-10-20 10:18:05 +02:00
Krille b5b5cfee5e
fix: Convert linebreaks into br tags on markdown parsing
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.
2023-09-29 09:24:50 +02:00
Krille 8ac86a883d
feat: Implement member change type
For easier handling and
comparing of m.room.member
state events to better
know what these event
actually changes.
2023-09-19 16:19:42 +02:00
td 538865f62a
chore: cleanup some eventTypes and unused variables 2023-06-27 13:46:39 +05:30
Malin Errenst f310632a83
fix: Assign correct type to signedOneTimeKeys 2023-06-22 17:18:10 +02:00
td 6a0a252912
feat: qr key verification 2023-06-21 19:15:26 +05:30
Malin Errenst 5943576b1b
refactor: Added type casts to match refactored matrix_api_lite 2023-06-16 12:42:10 +02:00
td 2ebda5e6fc
chore: fix edited last events breaking db 2023-06-01 23:58:47 +05:30
Krille 9c2f026b4d
refactor: Remove unused parameters 2023-05-11 09:24:41 +02:00
Malin Errenst cc377202da fix: remove deprecated sender_key occurrences 2023-05-08 09:12:14 +00:00
Krille 91617c1892
refactor: Make optional eventId a named parameter
This should not break the
API of consuming apps and
is more intuitive as the
parameter is nullable.
2023-04-28 10:03:04 +02:00
Nicolas Werner 831938b8f5
fix: Skip rules with unknown conditions
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.
2023-04-26 19:00:24 +02:00
Nicolas Werner 663ab11ec5
feat: Support private read receipts
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.
2023-04-21 18:31:15 +02:00
Nicolas Werner 7f519b5619 Merge branch 'main' into 'main'
Implement Thread creating/sending + added neccessary tests

Closes #351

See merge request famedly/company/frontend/famedlysdk!1262
2023-04-17 13:15:36 +00:00
Dmitriy Bragin 203fc25d7a feat: allow sending messages inside threads 2023-04-17 14:39:11 +03:00
Nicolas Werner 7039c33f3a
chore: Upgrade to matrix_api_lite 1.6 2023-04-17 13:23:51 +02:00
Philipp Grieshofer 9aff62a18c feat: Expose a getter for all rooms including archived rooms 2023-03-20 13:12:47 +00:00
Nicolas Werner 92999339a9 Merge branch 'krille/fake-user-event' into 'main'
fix: Fake User object

Closes #343

See merge request famedly/company/frontend/famedlysdk!1221
2023-02-17 09:02:59 +00:00
td 0c9e129347
fix: clean expired member state events in group calls 2023-02-14 23:08:50 +05:30
td 1219604dc9
fix: hasActiveGroup call now checks all group calls
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
2023-02-14 15:02:28 +05:30
Christian Pauly 31d4d5d08e fix: Check if argument is valid mxid in /maskasdm command 2023-02-14 09:16:48 +01:00
Nicolas Werner 9b3dd5acd7
chore: bump dart to 2.18
Allows us to get rid of some null assertions.
2023-02-01 11:39:55 +01:00
td c5d484bb13
feat: add method to generate the matrix.to link 2023-01-20 03:41:43 +05:30
Krille d6c4b530c5 refactor: room displayname calculation
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.
2023-01-17 08:51:07 +01:00
The one with the braid ed0ab3bdb9 Merge branch 'krille/remove-transaction-workaround' into 'main'
refactor: Remove database transaction workaround

See merge request famedly/company/frontend/famedlysdk!1192
2022-12-27 13:20:21 +00:00
Krille 185b27eaf7 Merge branch 'nico/invalid_pushrule_test' into 'main'
test: Add test for dendrites invalid pushrules

See merge request famedly/company/frontend/famedlysdk!1201
2022-12-27 08:54:43 +00:00
Nicolas Werner 2c87b2a8e3
test: Add test for dendrites invalid pushrules
While we do test against dendrite, it is useful to have a few targeted
tests.

See also https://gitlab.com/famedly/company/frontend/famedlysdk/-/issues/349
2022-12-23 11:38:00 +01:00
Nicolas Werner 8c096ef6ca
test: Add tests for account data store and retrieve
fixes https://gitlab.com/famedly/company/frontend/famedlysdk/-/issues/326
2022-12-21 19:49:59 +01:00
Christian Pauly 7a5b013c92 refactor: Remove database transaction workaround
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.
2022-12-21 09:41:11 +01:00
td d517581fa5 Merge branch 'krille/fix-powerlevels' into 'main'
fix: PowerLevel calculation regarding to spec

See merge request famedly/company/frontend/famedlysdk!1172
2022-11-21 09:39:50 +00:00
Christian Pauly f3287dbb99 fix: PowerLevel calculation regarding to spec 2022-11-21 10:14:28 +01:00
TheOneWithTheBraid 476963069a feat: support MSC 3935: cute events
- add cute event skeletron (`im.fluffychat.cute_events`)
- add cute events to default command batch
- this way, all SDK users can profit from cute events
- supported events: `hug`, `googly_eyes`, `cuddle`

Fixes:
https://rail.chat/@AgathaSorceress@eldritch.cafe/109336005433123570

Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
2022-11-21 09:17:07 +01:00
Christian Pauly e6182db16b refactor: Remove deprecated fluffybox 2022-10-28 12:56:20 +02:00
TheOneWithTheBraid ed7913e710 feat: introduce hightlighted room getter
- adds `Room.isUnreadOrInvited` extending `Room.isUnread` to invited rooms

This is some high-level abstraction simplifying computation of unread
room badges / notifications.

Related: https://gitlab.com/groups/famedly/company/-/epics/28

Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
2022-10-26 11:51:32 +02:00
Christian Pauly 69f82b2619 refactor: Remove unused imports 2022-10-18 11:42:11 +02:00
Nicolas Werner ee93d545cc chore: fix exception test after api_lite update 2022-10-17 12:52:08 +02:00
Nicolas Werner f55bb4776a feat: Support evaluating pushrules
fixes #339
2022-10-17 04:29:20 +02:00
Christian Pauly 403824b261 feat: Store original event 2022-09-19 09:40:42 +02:00
cloudwebrtc 62cd4e78fb chore: fix analyzer error. 2022-09-17 00:19:21 +08:00
Nicolas Werner 163ad0de6b fix: The initial sync waiting for a long time in some cases 2022-08-30 14:22:09 +02:00
Nicolas Werner dd1f61c29e feat: support dehydrated devices 2022-08-29 13:05:55 +02:00
Nicolas Werner 651abc7c14 Merge branch 'krille/add-mark-as-dm-commands' into 'main'
feat: Add markasdm and markasgroup commands

See merge request famedly/company/frontend/famedlysdk!1092
2022-08-15 14:19:17 +00:00
Nicolas Werner a47833ab80 Merge branch 'nico/lints' into 'main'
feat: switch from pedantic to lints

See merge request famedly/company/frontend/famedlysdk!1094
2022-08-15 14:15:51 +00:00
Nicolas Werner 6555f36d6d feat: switch from pedantic to lints 2022-08-15 14:15:51 +00:00
Nicolas Werner 4ac1615ad6 fix: coverage_without_olm tests
The coverage calculation is currently broken in dart/test, see
https://github.com/dart-lang/test/issues/1698 for reference.
2022-08-15 13:03:06 +02:00
Christian Pauly 527bcc63ad refactor: Add reference to itself in bootstrap onUpdate callback 2022-08-12 15:23:32 +02:00
Nicolas Werner 064b84305d chore: Add markasdm/group tests 2022-08-09 15:33:59 +02:00
Nicolas Werner 073d98cf3d feat: add coverage to MRs 2022-08-08 15:42:54 +02:00
td f56e0ddb5f
fix: check for m.call permissions in groupCallEnabled 2022-08-01 14:27:10 +05:30
Nicolas Werner 7f55e131f4 Merge branch 'td/enable_group' into 'main'
feat: allow enabling group calls in already created rooms

See merge request famedly/company/frontend/famedlysdk!1084
2022-07-24 19:24:43 +00:00
Jayesh Nirve 29c1241359
chore: add tests for group calls 2022-07-21 23:16:59 +05:30
Henri Carnot 2a019eaec3 feat: keep timeline history for archive rooms in memory 2022-07-21 14:14:17 +00:00
td f04d8a9f40 Merge branch 'krille/import-sorter' into 'main'
refactor: Use import sorter and ci templates

See merge request famedly/company/frontend/famedlysdk!1079
2022-07-21 13:59:05 +00:00
Christian Pauly 7885281c72 refactor: Use import sorter and ci templates 2022-07-21 15:44:04 +02:00
td 32d84dde1d Merge branch 'nico/try-canceling-async-task-in-archive-test' into 'main'
fix: (potentially) a race in the archive test

See merge request famedly/company/frontend/famedlysdk!1083
2022-07-21 06:16:10 +00:00
Nicolas Werner d5fd03d52d fix: (potentially) a race in the archive test 2022-07-19 14:13:55 +02:00
Jayesh Nirve 25abed35c4
chore: cleanup unused imports and analyzer warnings 2022-07-19 15:21:26 +05:30
Nicolas Werner 6e211f5a81 fix: race conditions in the SDK and its tests 2022-07-13 00:36:49 +00: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
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
Henri Carnot 65b20e7d17 fix: request history 2022-07-05 13:24:35 +00: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 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
Henri Carnot fb18843b08 refactor: make sender getter async 2022-06-02 08:13:21 +00:00
Henri Carnot 69dacc8ccd feat: allow updating image size 2022-05-31 20:32:35 +00:00
Lanna Michalke 8fd3bbe28c feat: support HiveCollections as Database provider
- support Hive's new `CollectionBox` and `BoxCollection`

Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
2022-05-21 20:19:52 +02:00
Krille Fear 3f3d4d38d6 refactor: Migrate to Matrix Api Lite 1.0.0 2022-05-17 22:50:04 +00:00
Henri Carnot ff586b06b1 fix: don't assume element is a string 2022-05-17 09:25:13 +00:00
h.carnot 6c2e525a64 fix: remove duplicated read marker 2022-05-16 10:49:57 +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 ecdbb06118 feat: introduce new MSC library architecture
- 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>
2022-05-03 09:17:57 +02:00
Henri Carnot f23abcd323 feat: get fully read marker 2022-05-02 08:43:54 +00: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
Krille Fear c5a6cc9a52 Merge branch 'krille/get-event-from-push' into 'main'
feat: Get event from push notification

See merge request famedly/company/frontend/famedlysdk!1008
2022-04-14 15:08:46 +00:00
Christian Pauly 5973e629fe feat: Get event from push notification 2022-04-14 17:01:05 +02:00
Christian Pauly 059a240214 feat: Add more localization strings and add default matrix localizations 2022-04-14 07:54:15 +02:00
Krille Fear 6f977b7c9d fix: Store sending files in database and fix retrying to send them 2022-04-01 14:26:57 +02:00
Nicolas Werner e2d2a69e45 Merge branch 'voip/move-voip-methods-from-room' into 'main'
chore: Move the call methods in room to the voip class.

See merge request famedly/company/frontend/famedlysdk!980
2022-03-25 23:51:55 +00:00
Duan Weiwei cac4dc967d chore: Move the call methods in room to the voip class. 2022-03-25 23:51:55 +00:00
h.carnot f095cbe29d feat: add some more tests 2022-03-18 11:45:08 +01:00
h.carnot 77347a44ff feat: allow removing markdown formating 2022-03-18 11:40:10 +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
Krille Fear 93b11dd8ca Merge branch 'krille/matrix-file-improvements' into 'main'
refactor: Make MatrixFile final and move all image calculation into isolate

Closes famedly/fluffychat#863

See merge request famedly/company/frontend/famedlysdk!972
2022-03-15 07:40:59 +00:00
Krille Fear 9fa5667234 refactor: Make MatrixFile final and move all image calculation into isolate
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.
2022-03-15 08:27:40 +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
Christian Pauly 01dfdb29fd fix: Has new messages compares ts
This compares the origin server timestamp which might not map
to the real sort order of the timeline. But it is the best
solution for now.
2022-02-15 10:26:17 +01: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
Nicolas Werner 4a52540006 fix: exception on removed widgets
And widgets without a name.

fixes #267
2022-02-13 23:11:53 +01:00
Christian Pauly f9875e2929 chore: Bump version 2022-02-08 08:43:19 +01:00
Krille Fear 84e87279e8 fix: Remove onHistoryReceived which was broken anyway 2022-02-07 15:15:44 +01:00
Christian Pauly 846d5b0f46 fix: Add redaction events to timeline
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.
2022-02-04 08:55:47 +01:00
Christian Pauly c82ae911db chore: Bump version 2022-02-03 10:53:48 +01:00
TheOneWithTheBraid fa6bd12294 feat: implement to get a room's widgets
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>
2022-02-02 08:38:56 +01:00
Lanna Michalke 58f6cde0bf BREAKING CHANGE: high-level hadling of image sizes
- 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>
2022-01-19 13:10:17 +01:00
Lanna Michalke cab03aa73b fix: Allow unpadded base64 decoding 2022-01-11 09:02:34 +00: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
Nicolas Werner d687973b01 fix: fallback in body for replies to replies 2021-12-15 19:21:41 +00:00
Sorunome b009ada0ac
fix: Allow consecutive edits for state events in-memory
The lastEvent was incorrect when trying to process an edit of an edit.
This fixes that by allowing consecutive edits for the last event.
2021-12-06 11:11:21 +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
Sorunome 872bc04674
fix(ssss): Strip all whitespace characters from recovery keys upon decode
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.
2021-12-05 12:19:22 +01: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 bc6ec5e592 Merge branch 'krille/idb' into 'main'
feat: Implement FluffyBox database

See merge request famedly/company/frontend/famedlysdk!900
2021-11-23 15:00:42 +00:00
Krille Fear 01eb851364 fix: 2021-11-23 15:48:18 +01:00
Krille Fear 921c694888 feat: Add clear cache command 2021-11-23 09:48:08 +01:00
Krille Fear a61e1ae4a3 feat: Add commands to create chats 2021-11-21 13:40:41 +01:00
Krille Fear b99a78476a refactor: Remove Sembast database implementation
It was a nice experiment but it
loading everything into memory
is just too slow for big
accounts.
2021-11-18 19:55:21 +01:00
Krille Fear 0532974022 Merge branch 'krille/sembast' into 'main'
feat: Implement sembast store

Closes #239

See merge request famedly/company/frontend/famedlysdk!892
2021-11-16 09:42:40 +00:00
Krille Fear f5051a5afe feat: Implement sembast store
refactor: Use typed store
2021-11-16 09:50:25 +01:00
Krille Fear 66bf8e6ace fix: HtmlToText crashes with an empty code block 2021-11-16 08:18:07 +01:00