Commit Graph

520 Commits

Author SHA1 Message Date
td 281510b950
feat: lcov and tag olm tests 2024-04-23 15:21:46 +05:30
krille-chan edcf331bf3
fix: canChangePowerLevel should return true for own user 2024-04-17 12:56:34 +02:00
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