Commit Graph

510 Commits

Author SHA1 Message Date
td 06a1594609
feat: endpoints for spec v1.14 (BREAKING CHANGE) 2025-03-27 22:50:35 +01:00
Karthikeyan S 77ec2e0604
feat: ensure direct chats have only 2 members before sending verification requests 2025-03-21 15:54:18 +05:30
Karthikeyan S a3aede19e8
fix: set prev_batch first time from sync response correctly 2025-03-19 17:09:28 +05:30
td f4c6c8d203
fix: set prev_batch when seen in sync 2025-03-17 19:13:48 +01:00
td 3a9e65d375
feat: allow skipping existing chat when calling startDirectChat
feat: also allow specifying timeout duration in oneShotSync
2025-03-17 15:27:43 +01:00
Karthikeyan S 0d084d8824
fix: room prev_batch set incorrectly follow-up 2025-03-13 10:05:05 +05:30
Krille fdbe95ba75
fix: Older state events overwrite newer ones on fetching history 2025-02-11 15:57:33 +01:00
Krille bf37bf82a0
refactor: Add missing versions to supportedVersions and use warning instead of blocking 2025-02-11 09:46:32 +01:00
Krille a352809a01
feat: (BREAKING) Make share keys with logic configurable 2025-02-05 14:18:49 +01:00
The one with the braid 86fa1f9203
feat: BREAKING improve command_extension
- unify behavior of all message sending related command
- add a StringBuffer as stdout-like output buffer for commands
- create a typedef for the command function signature
- create a common exception type for command execution
- enable commands to run on Client-level rather than Room-level
- BREAKING: Client.addCommand signature now takes an optional StringBuffer as second parameter
2025-02-04 16:19:57 +05:30
Krille 776e941b6e
refactor: Make converting linebreaks in markdowntohtml optional
Element actually does not do
this and use the linebreaks
inside of their <p> tags. It
works for our new html
rendering as well which is
already in FluffyChat.
2025-02-03 11:48:10 +01:00
Krille 3f04532ffe
refactor: Remove BasicRoomEvent type
We actually never use the
roomId of this type and the
matrix spec has changed in
a way that the roomId is
never sent there actually. So
it was super easy to just
replace all BasicRoomEvent
with BasicEvent. The roomId
became nullable anyway.
2025-01-09 11:05:01 +01:00
Krille 50ac4b55b2
fix: No roomId in BasicRoomEvent stores roomaccountdata silently wrong 2025-01-08 15:03:35 +01:00
Krille bc328aab5c
refactor: Use Event instead of EventUpdate for storing in db 2025-01-07 14:56:04 +01:00
Krille 5ac6c940a9
refactor: Update rooms by event not event update 2025-01-07 12:36:49 +01:00
Krille e7065afe31
refactor: Do not use eventupdate type for verification requests 2025-01-07 12:36:49 +01:00
Karthikeyan S 05ee4031bf
chore: BREAKING rename timeCreated to latestEventReceivedTime in Room 2024-12-31 22:16:31 +05:30
Krille 632ecbed7e
chore: Follow up store unable to decrypt information correctly 2024-12-31 13:36:11 +01:00
Krille 2c42c12e72
refactor: Handle Room Account Data outside of Room Event Updates
This also makes sure that
room account data does not
get unnecessarily serialized
and deserialized before
storing it in the database.
For this it changes the
code flow at multiple
places.
2024-12-31 10:58:09 +01:00
Krille 2d2bbc60cd
refactor: Do not unnecessarily serialize and deserialize json for every account data object
This changes the database
api a little bit so that it does
not unnecessarily serialize
and deserialize all
account data objects. Should
improve the performance of
the SDK.
2024-12-30 12:00:29 +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 e33a32e4fe
fix: Use MB and KB instead of MiB and KiB for file sizes 2024-12-18 11:35:23 +01:00
Konrad Pozniak c5532b8923
fix: don't reset wellknown cache on initialization 2024-12-17 13:09:10 +01:00
Krille bc7b987772
refactor: Remove unnecessary roomId parameter from decryptRoomEvent method 2024-12-17 11:23:58 +01:00
Krille 04a46226cb
refactor: Fix new lints from flutter 3.27 2024-12-15 12:21:26 +01:00
Karthikeyan S 9ded85e786
fix: clear legacy db on logout properly 2024-12-11 07:54:05 +05:30
Krille 29aa28eecf
feat: (BREAKING) Replace onMigration with advanced callback onInitStateChanged
This makes it possible to track
the process of initialization in the
client by just enhancing what
the onMigration callback already
does.
2024-12-09 12:33:15 +01:00
Krille 812c7dde82
refactor: Do not set default timeout for initialSync 2024-12-02 10:48:48 +01:00
Mohammad Reza Moradi 9c32193dff
chore: add require trailing comma lint 2024-11-07 16:13:37 +01: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 7605b1de31
feat: v1.12 spec endpoints support (BREAKING CHANGE) 2024-10-21 13:58:33 +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
td 140db616d9
feat: BREAKING CHANGE v1.11 matrix-spec endpoints 2024-09-19 14:16:49 +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 65c0f8119c
fix: actually make sure clientBox has a account 2024-08-28 17:00:14 +02:00
td d9681d552e
fix: dedup /versions calls 2024-08-23 16:30:56 +02:00
The one with the braid 6e48c308ad
feat: cache .well-known data
- BREAKING: create `DatabaseApi.storeWellKnown` method
- BREAKING: create `DatabaseApi.getWellKnown` method
- add new getter `Client.wellKnown` containing cached `DiscoveryInformation`
- override `Client.homeserver` to invalidate `Client.wellKnown` in case the domain changed
- override `Client.getWellknown` to cache the resolved `DiscoveryInformation`
- add tests for well-known cache

Fixes: #1865

Signed-off-by: The one with the braid <info@braid.business>
2024-08-23 10:01:34 +02:00
Krille 2dce08bab1
refactor: Also use authenticated media if unstable features claim support 2024-08-21 15:06:50 +02:00
td f79096dfbb
feat: support for authenticated media 2024-08-16 14:35:50 +05:30
Nicolas Werner 3d92428b7e
fix: leave->invite in the same sync would hide the invite
Synapse includes the room in both sections if you have both an
invite->leave and a leave->invite transition in one sync response.
Transitions in the other order are only included once (in the leave
section) it seems, so this should work correctly in all cases.

Fixes https://github.com/famedly/product-management/issues/2283
2024-07-31 19:25:58 +02:00
Krille a771f1e3bf
fix: Call logout on soft logout fail
If we fail to handle the
soft logout, we should call
the logout endpoint to
delete the device from
the server instead of just
clear the client.
2024-07-31 12:53:29 +02:00
td 22694a81d8
fix: also delete db on logout
we already cleared it out, but to change the db enc pw on the app we need to delete it completely first
2024-07-26 22:19:02 +05:30
Krille b962e8288b
feat: Add support for isFederate option for rooms 2024-07-26 13:45:13 +02:00
Krille e7802bd20b
fix: Synapse CI job failing because invite state not completely synced 2024-07-23 10:30:40 +02:00
Krille cabf357cf7
refactor: Cache profiles in database and refactor API 2024-07-23 08:51:10 +02:00
Krille 0f5526e1b8
feat: Automatically cancel typing indicators after 30 seconds 2024-07-03 14:36:40 +02:00
Krille 9d9865a1a1
fix: Do not update lastEvent with state events 2024-07-03 14:27:39 +02:00
td 869a7f41a9
fix: lastEvent after edit and redact 2024-07-01 21:31:13 +05:30
td a540bc6ef7
fix: dont override passed powerlevels with groupcall powerlevels 2024-06-11 19:00:39 +05:30