Commit Graph

111 Commits

Author SHA1 Message Date
Christian Kußowski 31a32b0145
feat: Migrate to vodozemac 2025-06-08 10:18:15 +02:00
Christian Kußowski ba38b1f97f
refactor: Do not store room update for leave rooms not cached anyway
This adds a check before the storeRoomUpdate() call
if the room is actually known. This has the effect
that the call of forgetRoom() is skipped.

The reason for this is an edge case in the database
implementation when calling getAllKeys(). This
somehow can corrupt the keys-cache and lead to
some problems. I wasn't able to fix this problem
yet so this refactoring is more a good-enough
workaround for now to not trigger it on an
initial sync. I plan to fix it with a different
approach which completely removes the keys-cache
in the future.

However this change leads to some problems in the
tests as they already rely on this edge case.
2025-06-02 10:08:19 +02:00
Christian Kußowski c618baae70
refactor: (BREAKING) Make database required 2025-05-16 08:28:08 +02:00
Krille e7065afe31
refactor: Do not use eventupdate type for verification requests 2025-01-07 12:36:49 +01:00
Krille bc7b987772
refactor: Remove unnecessary roomId parameter from decryptRoomEvent method 2024-12-17 11:23:58 +01:00
Mohammad Reza Moradi 9c32193dff
chore: add require trailing comma lint 2024-11-07 16:13:37 +01:00
Nicolas Werner ec36d9c8fe
fix: Race conditions in tests now that they are running faster 2024-10-07 21:37:42 +02:00
Krille 9d9865a1a1
fix: Do not update lastEvent with state events 2024-07-03 14:27:39 +02:00
Krille 4fd616bcbf
fix: Correctly store lastEvent in database after decryption 2024-07-02 08:44:46 +02:00
td a2e8830df0
chore: expose fake matrix api 2024-04-30 17:42:36 +05:30
td 281510b950
feat: lcov and tag olm tests 2024-04-23 15:21:46 +05:30
td dc411c9b14
fix: validate account_data values instead of checking them in syncUpdates 2023-12-20 21:10:31 +05:30
Nicolas Werner a0970b7fcb
chore: don't manually enable default rules 2023-11-17 12:59:20 +01:00
Nicolas Werner 82492f92e1
chore: upgrade lints 2023-11-02 10:20:33 +01: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
td 538865f62a
chore: cleanup some eventTypes and unused variables 2023-06-27 13:46:39 +05:30
td 6a0a252912
feat: qr key verification 2023-06-21 19:15:26 +05:30
Malin Errenst cc377202da fix: remove deprecated sender_key occurrences 2023-05-08 09:12:14 +00:00
Christian Pauly 403824b261 feat: Store original event 2022-09-19 09:40:42 +02:00
Nicolas Werner dd1f61c29e feat: support dehydrated devices 2022-08-29 13:05:55 +02: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 073d98cf3d feat: add coverage to MRs 2022-08-08 15:42:54 +02:00
Christian Pauly 7885281c72 refactor: Use import sorter and ci templates 2022-07-21 15:44:04 +02:00
Nicolas Werner 6e211f5a81 fix: race conditions in the SDK and its tests 2022-07-13 00:36:49 +00:00
Krille Fear 3f3d4d38d6 refactor: Migrate to Matrix Api Lite 1.0.0 2022-05-17 22:50:04 +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 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
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
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 9abe1ed81d fix: Dont enable e2ee in test verification DM room 2021-11-09 15:42:43 +01:00
Krille Fear 9be87918f1 refactor: Make room in Event class not nullable 2021-11-04 14:21:04 +01:00
Nicolas Werner 6e20c53b01
refactor: remove redundant null checks 2021-10-28 14:32:09 +02:00
Nicolas Werner e6f77924d6
refactor: port encryption tests 2021-10-28 03:44:02 +02:00
Nicolas Werner 17fd1f22b3 refactor: make event nullsafe 2021-10-25 10:10:25 +00:00
Nicolas Werner 60956bde00 chore: port the remaining encryption files to nullsafety 2021-10-13 13:58:21 +00:00
Jayesh Nirve 77ca7523d0 refactor: remove unused clientId 2021-09-24 16:05:05 +02:00
Sorunome b41c7b1bc6
fix: Don't re-play m.dummy to_device events
If both ends had m.dummy events queued as last messages an an olm
session corrupted, then the clients landed in an infinite game of
ping-pong. It was so stable, that the clients could have won the
ping-pong world championships!
2021-09-21 10:05:51 +02:00
Sorunome 0611ea1495
fix: Auto-reply key requests 2021-09-16 22:14:41 +02:00
Christian Pauly 00771fc209 refactor: _updateUserDeviceKeys method 2021-09-13 14:58:07 +02:00
Christian Pauly 9c1f79359e refactor: Replace all logic regarding sortOrder
The current implementation of sortOrder can be made way more easier now
by just keeping the sortOrder of the list
and the timelineFragments in the hiveStore. This needed a huge
change but mostly removes a lot of code which can be done
way more easy now. This also needed some rewriting of the setState logic and changes to
the prevEvent calculation. This solution should also be more stable.
More information:
https://www.reddit.com/r/fluffychat/comments/pfnlhq/the_sort_order_of_matrix_timelines/
2021-09-02 07:13:38 +00:00
Christian Pauly 5eb2d22207 refactor: Make eventupdate null safe 2021-08-30 09:20:17 +02:00
Christian Pauly 9b7474e2f2 refactor: Update to dart 2.12 and opt out in all files
This also adds some missing license headers, I have detected while
using license header search&replace to add the
null safety opt out
2021-08-18 08:09:39 +02:00
Sorunome 98b0bd4322 feat: Add a way to get a verification request by its transaction id
A client might find the need to get the verification request object by
its transaction id, to be able to e.g. display for in-room verification
an "accept verification request" button easily.
2021-08-17 15:03:30 +00:00
Nicolas Werner 179f73db3a fix: Upload OTKs if the otk_count field is missing
fixes #180
2021-07-26 09:47:05 +02:00
Christian Pauly c0c7f68bf3 chore: Rename to matrix 2021-06-18 09:58:25 +02:00