Commit Graph

1857 Commits

Author SHA1 Message Date
Krille 4906ae02cf
feat: Add missing localizations for key verification messages 2024-01-22 12:49:27 +01:00
Krille 544888fe33
refactor: Use maxnumberofotk from olm instead hardcode 100 2024-01-15 13:56:54 +01:00
Krille 2afd7040a7
fix: Another type error when combining lists 2024-01-12 16:24:00 +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 245cf59205
fix: Type error when combining dynamic lists 2024-01-04 08:30:00 +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 43db98c7b6
fix: Add missing copy map in matrix sdk database 2023-12-27 15:45:44 +01:00
krille-chan b4607be5d0
feat: Make possible to fetch presence from database only 2023-12-27 10:22:54 +01:00
Krille 6955969e36
fix: typerror in removeEvent method from new database 2023-12-27 09:44:54 +01:00
Krille 4c8d7c959c
fix: clearCache does not clear room account data 2023-12-22 13:45:38 +01:00
td dc411c9b14
fix: validate account_data values instead of checking them in syncUpdates 2023-12-20 21:10:31 +05:30
Krille 39527c9033
refactor: Connect timeline to event updates earlier
This creates the timeline object
earlier in the Room.getTimeline() method.
This results to that the
Timeline object already starts
to listen on the event stream
while the getTimeline() method
requests users from the database
and tries to decrypt room
events. I assume that this
causes the problem that
on timeline creation new
events get lost because they
come in, while getTimeline() is
not yet completed but the
onEvent stream is not yet
connected at the same time.
2023-12-20 13:29:35 +01:00
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
td 520dfdbe3e
fix: check negotiate party and call ids
chore: making some call naming schemes better
2023-12-15 21:39:06 +05:30
Krille c443e79d29
fix: Increase timeout for initial sync from 10 seconds to 2 minutes
This fixes the response
timeout for the initial
sync and sets it to 2
minutes instead of 10
seconds. This should increase
the speed for the initial
sync especially for large
accounts. This change
also adds some
documentation in the
code about what
timeout does what.
2023-12-15 13:18:10 +01:00
Krille fd1b4eed92
fix: canSendDefaultMessage ignores overwritten events
This refactors three methods
regarding powerlevels. It
makes them a little bit more
readable and removes
unnecessary checks. it
also changes the canSendDefaultMessage
method in a way that it also
checks the events map in the
powerlevels so that it returns
true if message events are
overwritten there. It also
improves the dart docs and
explains in more detail what it
does.
2023-12-15 12:05:05 +01:00
Nicolas Werner e1b80a1f3f
Merge branch 'main' into karthi/cache-get-config 2023-12-14 16:33:50 +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 55bfc92ee0
refactor: Make possible to wait for first sync and await first sync before create megolm session 2023-12-13 14:02:53 +01:00
Karthikeyan S db0762ad3f
feat: cache getConfig request 2023-12-13 18:28:44 +05:30
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
Krille 5e2623672c
fix: Copy all maps got from database
Unfortunately we need to copy
all maps. I took the opportunity
and abstracted the copy map
method to utils. I kept the
copyMap method as a
reference in HiveCollections
database to not require a
huge refactoring there as we
are going to ditch it anyway.
2023-12-11 08:32:06 +01:00
Krille b547b7dfe0
build: Add changelog for v0.24.1 2023-12-07 10:24:42 +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
Krille 0b1281358f
fix: Do not hide matrix exceptions in sync 2023-12-05 09:04:51 +01:00
Karthikeyan S 0811b8911b
fix: set cid before initWithInvite to handle getUserMedia exception correctly 2023-12-04 17:41:16 +05:30
Karthikeyan S f4b0a629c7
chore: add null check for remotePartyId before ignoring reject/hangup 2023-11-29 12:32:57 +05:30
Karthikeyan S 6b9be63a4d
fix: ignore reject/hangup events for a live call from a different device 2023-11-29 12:32:57 +05:30
Nicolas Werner 52a5485f7a
fix: don't delete the dehydrated device before we are sure the keys got saved 2023-11-28 11:02:43 +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 8e9bcc2d36
fix: Delayed encrypted event in timeline not added to aggregated events 2023-11-27 16:12:45 +01:00
Krille 06669cbcac
refactor: Store fetched presence in db and deprecate own cache 2023-11-27 15:48:21 +01:00
Krille 193f404885
refactor: Add SyncConnectionException to syncloop 2023-11-27 09:11:57 +01:00
Nicolas Werner 25f4353ab0
fix: key uploads only running once
There were several issues here. Key uploads in general failed, because
the await caused a Future<dynamic> to be returned, which failed type
checking.

But also we never unset our future, which was used for the online key
backup uploads, which meant we would very quickly stop uploading any
keys at all.
2023-11-24 17:42:57 +01:00
Krille 82b885dee0
feat: Add sendRaw command 2023-11-22 15:35:29 +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 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 5dc3adadfc
chore: enable avoid_bool_literals_in_conditional_expressions 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
Nicolas Werner e03826b1bb
Merge branch 'main' into krille/better-syncloop-error 2023-11-16 22:21:59 +01:00
Nicolas Werner 0b3542730d
Merge branch 'main' into krille/store-presences 2023-11-16 21:36:13 +01:00
Krille d1bbf57b6f
fix: Set presence when loading archive 2023-11-15 14:18:48 +01:00
Mohammad Reza Moradi d5447c62f7
fix: hangup on call crash 2023-11-15 08:49:35 +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
Karthikeyan S 243275d644
Merge branch 'main' into karthi/fix-hangup-timeout 2023-11-06 17:31:22 +05:30
krille-chan b1b2b2ffe2
fix: catch correct exception type for connection problems 2023-11-05 09:52:08 +01:00
Nicolas Werner 37582a3a8e
fix: stale call checker leaks memory 2023-11-04 00:30:14 +01:00
td 579b8aa944
Merge branch 'main' into karthi/fix-hangup-timeout 2023-11-03 19:22:01 +05:30
Karthikeyan S 88110773ab
fix: call hangup on timeout race condition 2023-11-03 16:05:37 +05:30
Nicolas Werner 82492f92e1
chore: upgrade lints 2023-11-02 10:20:33 +01:00
Nicolas Werner 620187c772
Merge branch 'main' into braid/store-left-rooms-in-archive 2023-11-02 08:49:48 +01:00
Krille f0e4232930 refactor: Wait for room in sync until sync process and trigger cleanup call not before actually start clean up. 2023-10-23 12:30:14 +02:00
Krille 6f144198b7
fix: Do not convert linebreaks in pre blocks on markdown parsing 2023-10-23 08:39:26 +02:00
The one with the braid 5dea95f02c fix: Code style
Signed-off-by: The one with the braid <info@braid.business>
2023-10-20 14:58:56 +02:00
Clemens-Toegel f1fd6f43f9 chore: remove archived room on forget (#2)
Co-authored-by: Clemens Toegel <clemens.toegel@x-tention.at>
2023-10-20 14:04:11 +02:00
Clemens-Toegel 0ec6a64cc8 chore: store states to archived rooms (#1)
* chore: store states to archived rooms

* chore: PR fix

---------

Co-authored-by: Clemens Toegel <clemens.toegel@x-tention.at>
2023-10-20 14:04:11 +02:00
The one with the braid 053dddb76d chore: incrementally add left rooms to archive
- store left rooms in archive during sync (as well as they are removed
  on join already)
- refactor room archive code
- fix typo

Internal reference: SMC-385

Signed-off-by: The one with the braid <info@braid.business>
2023-10-20 14:04:11 +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
Ray 4b51c1c5fd fix: fixed hardcoded historyCount 2023-10-20 11:25:45 +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 5dd444daf2
refactor: Update markdown 2023-09-28 08:09:17 +02:00
Nicolas Werner 97bf7723dd fix: Wait for rate limit to pass while sending messages
Otherwise the user can't handle that exception themselves, since we
don't rethrow.
2023-09-21 13:04:57 +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
Nicolas Werner dab7f6667e
Merge branch 'main' into nico/fix-okb-bootstrap 2023-09-19 14:02:18 +02:00
Nicolas Werner bf51e57e78
chore: remove redundant log message 2023-09-19 12:24:06 +02:00
Nicolas Werner 3fb77383a3
fix: wait for online key backup key to be cached on reset
Otherwise uploading the keys won't work, since the key backup is
"disabled".
2023-09-18 17:16:43 +02:00
Nicolas Werner 500e423c00 fix: storing the end of history pagination
At least in our CI this throws a null assertion error and since we
explicitly expect this to sometimes be null in our code, we should store
it as such.
2023-09-18 12:02:06 +02:00
Mohammad Reza Moradi c38cbbc8dc
fix: apply state event before decryption on leaved room 2023-09-18 11:33:17 +02:00
Nicolas Werner 5b47a647b6
fix: userOwnsEncryptionKeys returns true for empty device lists 2023-09-13 14:26:41 +02:00
Nicolas Werner cce3646339
fix: startDirectChat might return an unjoined room
If you create DM room, but the other party doesn't join it, they might
be unable to create a new DM using startDirectChat. Since creating a new
DM is pretty much the same as joining the invite, we try to join the
pending DM invite first and fall back to creating a new room if that
fails.
2023-09-04 13:27:55 +02:00
mErrenst b17f3a47f2
Merge pull request #1547 from famedly/krille/request-participants-cache
feat: Add option to not cache users in memory when requesting all of …
2023-08-16 09:15:56 +00:00
krille-chan 0c60ad7acd
feat: Add option to not cache users in memory when requesting all of a room 2023-08-13 08:16:11 +02:00
Krille dd64f4702a
fix: Has new messages is never true 2023-08-10 08:44:07 +02:00
The one with the braid 30c27f00a1
fix: direct message room name computation
Signed-off-by: The one with the braid <braid@famedly.com>
2023-08-04 08:17:17 +02:00
Nicolas Werner 4addccd9da
Merge pull request #1534 from famedly/nico/simplify-sorting
refactor: simplify UIA stage selection logic
2023-08-01 08:56:56 +00:00
Nicolas Werner 59693b7375
refactor: simplify UIA stage selection logic
(Also prevents a potential out of bounds exception)
2023-08-01 10:31:55 +02:00
Nicolas Werner b27fd4575d
Merge pull request #1535 from famedly/nico/fix-okb-reset
Make online key backup reset actually backup keys
2023-08-01 08:24:25 +00:00
Nicolas Werner a016709a40
feat: Upload keys on OKB reset
This does make the reset take longer on big accounts, but otherwise
users might sign out before the keys are uploaded, which makes the reset
more destructive than necessary. In the common case of not having any
keys it shouldn't make a difference.
2023-07-31 17:31:04 +02:00
Nicolas Werner eb0759caf5
fix: fix upload of old session after reset
Otherwise we would need to wait for a new inbound session to upload
them. It might increase disk usage a bit every 10 minutes.
2023-07-31 17:31:04 +02:00
Nicolas Werner 334c9e3b78
refactor: Simplify room sorting logic to make invite sorting more obvious
It wasn't quite obvious that invites were always sorted at the top, if
you just looked at the sort function. This makes it more explicit and
also makes invites always sort before favourited rooms.
2023-07-31 10:55:27 +02:00
td 66a53786e7
fix: do not proceed call if getUserMedia fails
fix: added a few missing awaits

fix: add a workaround for not having state updates for staleCallChecker till sync

chore: fix some logging
2023-07-10 14:19:16 +05:30
td d042f9e6ae
chore: pass event to redactedAnEvent and removedBy 2023-07-04 17:09:23 +05:30
td 538865f62a
chore: cleanup some eventTypes and unused variables 2023-06-27 13:46:39 +05:30
td bfda82bb45
chore: fix unexpected null when device is not known 2023-06-27 13:30:05 +05:30
Malin Errenst 5d8a82aefa
fix: Fixed fake_matrix_api.dart signedOneTimeKeys upload 2023-06-22 18:05:04 +02:00
Malin Errenst f310632a83
fix: Assign correct type to signedOneTimeKeys 2023-06-22 17:18:10 +02:00
Malin Errenst 3bd36aa19f
fix: Fix type cast to fix test in matrix-fhir-dart-sdk 2023-06-22 14:29:29 +02:00
td 6a0a252912
feat: qr key verification 2023-06-21 19:15:26 +05:30
Malin Errenst 395ef0eb8e
refactor: Use tryGet for type casts whenever possible 2023-06-21 15:04:46 +02:00
Malin Errenst 5943576b1b
refactor: Added type casts to match refactored matrix_api_lite 2023-06-16 12:42:10 +02:00
Malin Errenst 17df38b874
refactor: Added type casts for refactored dart_openapi_codegen 2023-06-16 12:41:29 +02:00
Krille b90c1b8ca7
fix: Do not display prevContent displayname and avatar for joined users 2023-06-14 12:54:18 +02:00
td e45dbd169d
chore: add qr releated eventTypes 2023-06-13 11:45:27 +05:30
Krille e81898ef7f
refactor: Get rid of dynamic lists 2023-06-13 07:59:20 +02:00
Malin Errenst 06d587e64f
refactor: Changed Map<String, dynamic> to Map<String, Object?>
- contains breaking changes because some type casts will be needed in
  Matrix SDK
2023-06-09 15:04:28 +02:00
Malin Errenst cf984d61f9
chore: generated folder from recent dart_openapi_codegen 2023-06-09 15:04:19 +02:00