Commit Graph

89 Commits

Author SHA1 Message Date
Christian Kußowski c618baae70
refactor: (BREAKING) Make database required 2025-05-16 08:28:08 +02:00
Krille bc328aab5c
refactor: Use Event instead of EventUpdate for storing in db 2025-01-07 14:56:04 +01:00
Krille e7065afe31
refactor: Do not use eventupdate type for verification requests 2025-01-07 12:36:49 +01:00
Krille 9fc7f4a3b4
refactor: Do not handle ephemerals as EventUpdates
This handles room ephemerals
directly and not as room
event updates, which saves
one unnecessary step to json serialize and
deserialize. Handling those
as room event updates had
no benefit anyway so this
should speed up performance.
2024-12-30 11:38:53 +01:00
Krille 017a39c792
refactor: Use Event instead of EventUpdate for pending decryption event queue and for decrypt events in general
This should removes an
unnecessary step of
json serialization and deserialization and should
therefore improve performance.
Gets rid of some unnecessary
code as well.
2024-12-27 13:12:44 +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
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
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
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
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
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
Malin Errenst cc377202da fix: remove deprecated sender_key occurrences 2023-05-08 09:12:14 +00:00
Krille 2c14af9a8b
fix: Reactions are sent encrypted 2023-05-03 13:01:10 +02:00
TheOneWithTheBraid 476963069a feat: support MSC 3935: cute events
- add cute event skeletron (`im.fluffychat.cute_events`)
- add cute events to default command batch
- this way, all SDK users can profit from cute events
- supported events: `hug`, `googly_eyes`, `cuddle`

Fixes:
https://rail.chat/@AgathaSorceress@eldritch.cafe/109336005433123570

Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
2022-11-21 09:17:07 +01:00
Christian Pauly 0a6a813804 refactor: Get rid of unnecessary type cast 2022-11-07 11:09:20 +01:00
Christian Pauly da8ebe85ef fix: Do not try to decrypt redacted events 2022-10-28 12:25:35 +02: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
Christian Pauly 527bcc63ad refactor: Add reference to itself in bootstrap onUpdate callback 2022-08-12 15:23:32 +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
Christian Pauly f1d422b89a fix: Dont encrypt reactions
This fixes that server
sends notifications for reactions.
2022-03-15 08:42:53 +01:00
Krille Fear 03418bfe8b chore: Enable E2EE recovery by default
We have disabled it by default to
prevent using workarounds as
long time solutions and to not
miss bugs. But in a federated
context we can not be sure that
we all Matrix clients are ever
bug free and we have now the
onEncryptionError Stream
anyway.
2021-11-25 15:48:17 +01:00
Krille Fear 048b7faba0 fix: JSON parsing in decryptRoomEvent method
This makes the use of the
event content null safe and
type safe which fixes a
regression when sessionId is
null.
2021-11-10 09:19:40 +01:00
Krille Fear 9be87918f1 refactor: Make room in Event class not nullable 2021-11-04 14:21:04 +01:00
Nicolas Werner ebd5bc3d24
refactor: make room nullsafe 2021-10-28 00:54:25 +02:00
Nicolas Werner fb0a84d7b2
refactor: make client nullsafe 2021-10-25 16:34: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
Nicolas Werner 1c838e3be8 fix: Cleanup nullsafe encryption a bit 2021-09-30 12:58:37 +00:00
Nicolas Werner a196b53219 refactor: nullsafe encryption 2021-09-30 12:58:37 +00:00
Krille Fear 62fe7a1704 fix: New verification requests on requesting history
If requesting history happens to contain a m.key.verification.request we currently create a new key verification object and push it to the client.
This fixes it.
2021-09-27 14:51:25 +02:00
Jayesh Nirve 77ca7523d0 refactor: remove unused clientId 2021-09-24 16:05:05 +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 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
Christian Pauly 69b52ba85b refactor: Move pedantic to dev_dependencies
The unawaited method from the pedantic package was a historic solution
for the case that you dont want to await a future in an async function.
But now we can do this with just a comment which
is the recommended way to do this now.
This makes it possible to have pedantic as a dev_dependency which means just one dependency less.
2021-06-18 10:15:59 +02:00
Christian Pauly c0c7f68bf3 chore: Rename to matrix 2021-06-18 09:58:25 +02:00
Christian Pauly ffef732103 refactor: enable more linter rules
enable prefer_final_locals and prefer_final_in_for_each linter rules
2021-04-14 10:29:29 +02:00
Krille Fear 0d8bddf708 Merge branch 'soru/fallback-keys' into 'main'
feat: Add fallback keys support

Closes #136

See merge request famedly/famedlysdk!653
2021-03-03 07:38:32 +00:00
Sorunome 498c7825a5
feat: Add fallback keys support 2021-03-02 16:17:32 +01:00
Christian Pauly c9d3c327f6 refactor: Deprecate eventType in EventUpdate 2021-02-26 13:06:02 +01:00
Christian Pauly 9fac03639e change: Olm exception handling 2021-02-03 11:01:01 +01:00
Sorunome a35266f1e4
feat: Replay last sent olm message on olm session recovery from other device 2021-01-20 12:50:52 +01:00
Christian Pauly 8b13df8c9d refactor: Add json parsing for encryption and encrypted content 2021-01-08 13:26:25 +01:00
Christian Pauly 39b776716c refactor: Olm Exceptions 2021-01-07 12:53:49 +01:00
Christian Pauly 88403d19ba fix: Dont run background task after logged out 2021-01-05 15:15:39 +01:00
Sorunome a0f7dd4732
fix: Disable auto-verify own master key for now 2021-01-05 14:54:40 +01:00