Commit Graph

3449 Commits

Author SHA1 Message Date
Krille b978cf01c8
build: Bump version to 0.34.0 2024-10-21 15:05:17 +02:00
Krille-chan 2afd1cd800
Merge pull request #1942 from famedly/krille/invalidate-async-cache-on-error
fix: AsyncCache is not invalidating on error
2024-10-21 14:57:04 +02:00
Krille b1198f7b80
fix: AsyncCache is not invalidating on error
This fixes for example that if a
fetch from an asynccache once
failed it never gets retried. So we
only want to cache results, not
exceptions/errors
2024-10-21 14:53:52 +02:00
td 1fe916c619
Merge pull request #1939 from famedly/td/specv1.12
feat: v1.12 spec endpoints support
2024-10-21 14:03:01 +02:00
td 7605b1de31
feat: v1.12 spec endpoints support (BREAKING CHANGE) 2024-10-21 13:58:33 +02:00
Krille-chan 7e8496a70f
Merge pull request #1940 from famedly/nico/update-dependencies-oct-2024
chore: Upgrade dependencies
2024-10-21 13:26:31 +02:00
Nicolas Werner 434ef9b880
chore: Upgrade dependencies
The library annotations are a new lint and we have no need to specify a
custom library name anywhere. The JS annoation on the library also did
nothing, since it doesn't default to the library name in dart and only
modifies the prefix of functions if you pass in a custom name.

The sqflite_common_ffi I removed the upper constraint, which allows us
to use a newer version if our dart version is new enough, but I left it
at the original version because there is no need to require a higher
minimum currently.
2024-10-21 13:04:47 +02:00
td b6945e763d
Merge pull request #1927 from famedly/td/objectHelperOverrides
feat: BREAKING CHANGE add equality, hashcode and toString helper overrides to autogenerated code
2024-10-18 14:13:25 +02:00
td b2e747bb3a
feat: add equality and hashCode overrides for autogenerated models (BREAKING CHANGE) 2024-10-18 14:02:55 +02:00
Nicolas Werner ecbcc5f6fe
Merge pull request #1920 from TheOneWithTheBraid/braid/only-emotes-regex
chore: update Emote-only expressions
2024-10-18 12:58:30 +02:00
The one with the braid 0be79a9ee9
chore: update Emote-only expressions
- update the emote base regex
- update documentation about emote computation
- add source for the emote regex
- explain use of regex replace instead of `calcUnlocalizedBody`

Signed-off-by: The one with the braid <info@braid.business>
2024-10-18 12:54:38 +02:00
Krille-chan d243116ae1
Merge pull request #1938 from famedly/krille/use-object-hash
refactor: Use Object.hash instead of hashCode ^
2024-10-16 15:48:06 +02:00
Krille 2d73192a40
refactor: Use Object.hash instead of hashCode ^ 2024-10-16 15:13:30 +02:00
td 3e35120aa1
Merge pull request #1924 from famedly/nico/unlocalizedBody
Fix various edge cases in the unlocalized body calculation
2024-10-16 14:01:59 +02:00
Nicolas Werner e3d41bb449
fix: properly remove reply fallback from (un)localized body 2024-10-16 13:59:12 +02:00
Nicolas Werner 43bc0e1963
chore: tear down clients in event tests properly
Fixes some noise around logs when I was trying to enable branch
coverage.
2024-10-16 13:59:12 +02:00
Nicolas Werner e1f0d9c0ad
fix: edge cases when calculating (un)localized body
We used to randomly return an empty string when the formatted body was
empty, even though we never return an empty string usually. Similarly we
used to return the original formatted body in an edit, when the new
event has no formatted body.
2024-10-16 13:59:12 +02:00
Nicolas Werner a497a66012
chore: Add more (un)localized body tests
Covers a few edge cases that still fail. Changes to the unlocalizedBody
function shouldn't cause behavioural changes apart from fixing a few
edge cases.
2024-10-16 13:59:11 +02:00
Nicolas Werner c7d49695d5
fix: prevent body (and plaintextBody) from return html by accident
It is not clear why we ever would want to return the formatted_body when
we ask for the body, but it seems to not be used anywhere and there are
no tests covering that functionality. However it leads to suprising
results, where the plaintextBody can be tricked into returning html
without applying conversions. So we just get rid of that functionality.
2024-10-16 13:59:11 +02:00
Nicolas Werner 9ebd2e3893
fix: enable some event tests without libolm
Otherwise we were skipping the emoji tests without crypto set up and
similar, which was not intentional.
2024-10-16 13:59:06 +02:00
Krille-chan 625b032e96
Merge pull request #1929 from famedly/krille/fix-set-power-level
fix: Change power level without changing memory
2024-10-08 15:13:33 +02:00
Krille 4a754ded5f
fix: (BREAKING) Change power level without changing memory
The problem here is that we
have not created a deep copy
of the power level map. By using .copy() we create a
deep copy now.
2024-10-08 15:10:49 +02:00
Krille-chan 9973a81bde
Merge pull request #1935 from famedly/krille/migrate-to-spec-mark-unread
refactor: Migrate to m.marked_unread from Matrix v1.12
2024-10-08 15:10:30 +02:00
Krille 13d756856e
refactor: Migrate to m.marked_unread from Matrix v1.12 2024-10-08 15:03:39 +02:00
Krille-chan 6117e1cba8
Merge pull request #1936 from famedly/krille/make-clear-that-upload-content-does-not-e2ee
chore: Make more clear that Client.uploadContent() does not end to end encrypt the file
2024-10-08 14:59:22 +02:00
Krille cdf6814f0a
chore: Make more clear that Client.uploadContent() does not end to end encrypt the file 2024-10-08 14:56:53 +02:00
Krille-chan 2527ea57ee
Merge pull request #1934 from famedly/nico/speedup-tests
Speedup tests
2024-10-08 14:56:12 +02:00
Nicolas Werner a6e8e40c99
chore: Switch to cheaper github runner
Might also fix our weird test hangs
2024-10-08 14:41:36 +02:00
Nicolas Werner e32a6ac037
chore: bump dart version to fix tests not exiting sometimes 2024-10-07 21:56:49 +02:00
Nicolas Werner ec36d9c8fe
fix: Race conditions in tests now that they are running faster 2024-10-07 21:37:42 +02:00
Nicolas Werner 6a28ab05d0
fix: Deduplicate key OTK uploads
We do the key upload asynchronously without awaiting it. This means we
may do multiple syncs before the key upload finishes. So we may generate
more keys than we should.

To fix that prevent multiple key uploads from running at once. This may
lead to outdated key uploads in some cases if we miss an OTK being used
in sync. However, the next sync will still tell us about that so in the
worst case this might delay key uploads by 30s (with the default sync
timeout), which for normal usage should be completely acceptable.
2024-10-07 20:55:14 +02:00
Nicolas Werner 583be5ece7
fix: by default don't uplaod new keys in our tests
This reduces CPU load of the uploadKeys callback by a lot, since we
don't upload new keys on every empty sync in the tests.
2024-10-07 20:38:08 +02:00
Nicolas Werner b74dbdea4a
fix: Don't wait for 5 milliseconds on every sync in our tests
This was added in 77be6102f6 without much
documentation. I am pretty sure the intent was never to slow down every
test by 5 seconds, so let's get rid of it and do more careful delays
where it is useful (like specific sync requests for example).

Makes the tests run 5 times faster (the whole suite!) on my device.
2024-10-07 20:38:08 +02:00
td 2085964a68
Merge pull request #1932 from famedly/krille/call-event-unexpected-sender-debug-log
chore: Lower loglevel for call event with unexpected sender
2024-10-07 12:24:00 +02:00
Krille b913b40fd8
chore: Lower loglevel for call event with unexpected sender 2024-10-07 10:31:29 +02:00
td 71180deec7
Merge pull request #1919 from famedly/release/v0.33.0
chore: release v0.33.0
2024-09-19 15:33:57 +02:00
td d80357e4c0
chore: release v0.33.0 2024-09-19 15:03:03 +02:00
td c84172df80
Merge pull request #1914 from famedly/td/v1.11support
feat: BREAKING CHANGE v1.11 support
2024-09-19 14:25:02 +02:00
td 140db616d9
feat: BREAKING CHANGE v1.11 matrix-spec endpoints 2024-09-19 14:16:49 +02:00
Nicolas Werner ca41a963e3
Merge pull request #1918 from famedly/nico/fix-archive-rooms-becoming-joined
fix archive rooms becoming joined
2024-09-18 11:28:43 +02:00
Nicolas Werner 15dce00c0f
fix: don't convert archived rooms to joined rooms by accident
When decrypting the last event for archived rooms when a room key is
received, we used to send a synthetic SyncUpdate. This however put the
archived room into the join section, which converted the room to a
joined room. We need to respect what section the room was in when
sending synthetic SyncUpdates.

fixes https://github.com/famedly/matrix-dart-sdk/issues/1916
2024-09-18 11:11:35 +02:00
Nicolas Werner fec258ef12
fix: wait for pending transactions before db close
This was triggered by some archive decryption test I was writing and
possibly also is triggered in production a few times. Waiting for
running transactions to complete before closing sounds sensible.
2024-09-18 10:43:03 +02:00
Nicolas Werner 12f45e7687
Merge pull request #1917 from famedly/nico/fix-archive-load
fix: also lazy load members for archive
2024-09-17 12:55:20 +02:00
Nicolas Werner b839273ce0
fix: also lazy load members for archive
This should speed up loading the archived rooms. One of the reasons it
was so slow, is because we were loading all room members!

Additionally this may work around a bug in Synapse, where rooms stuck in
their partial state may block sync indefinitely.

Relates to https://github.com/famedly/product-management/issues/2250
2024-09-16 16:36:25 +02:00
td 804832e951
Merge pull request #1911 from famedly/release/v0.32.4
chore: release v0.32.4
2024-08-28 18:13:45 +02:00
td cd89982ab6
chore: release v0.32.4 2024-08-28 17:33:21 +02:00
td 9b8fa95a52
Merge pull request #1910 from famedly/td/wellKnownBreakFix
fix: actually make sure clientBox has a account
2024-08-28 17:07:09 +02:00
td 65c0f8119c
fix: actually make sure clientBox has a account 2024-08-28 17:00:14 +02:00
td 4a8f628706
Merge pull request #1909 from famedly/release/v0.32.3
chore: release v0.32.3
2024-08-27 10:25:03 +02:00
td 7a1d82da1d
chore: release v0.32.3 2024-08-27 10:16:44 +02:00