Commit Graph

1685 Commits

Author SHA1 Message Date
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