Commit Graph

2107 Commits

Author SHA1 Message Date
td 020438f698
chore: (BREAKING CHANGE) spec v1.13 autogen 2025-01-13 09:26:59 +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
Karthikeyan S 64030693c9
chore: add transactionId getter to Event class 2025-01-08 23:07:32 +05:30
Krille 50ac4b55b2
fix: No roomId in BasicRoomEvent stores roomaccountdata silently wrong 2025-01-08 15:03:35 +01:00
Krille 2e8bae85c8
refactor: (BREAKING) Push Notification helper class make all fields optional and migrate dynamics to Object? 2025-01-08 09:43:09 +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 83003c86c7
fix: clear cache when clearing DB in MatrixSdkDatabase 2025-01-07 16:36:37 +05:30
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 135face535
refactor: (BREAKING) Remove deprecated Hive Database 2024-12-31 09:00:47 +01:00
Krille ce0dfc77ff
fix: Also load room account data in getSingleRoom() 2024-12-30 12:49:14 +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
Karthikeyan S 239a39e2cb
feat: support push rule conditions event_property_is & event_property_contains 2024-12-23 15:21:01 +05:30
Krille 957b4241ad
refactor: Replace enhanced enum with native dart enum 2024-12-18 15:14:20 +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
Karthikeyan S f3e25596ac
fix: BREAKING! missed initial updates for stream listener callbacks in P2P & mesh calls 2024-12-17 18:11:13 +05:30
Konrad Pozniak c5532b8923
fix: don't reset wellknown cache on initialization 2024-12-17 13:09:10 +01:00
Krille c58f55c012
chore: Make parse version error less sound 2024-12-17 12:55:56 +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 ce7838e72a
refactor: BREAKING Store room states as triple keys 2024-12-09 12:36:39 +01:00
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 a26653a098
refactor: Clarify Room.join() behavior and make sure DM link is purged if room not found 2024-12-09 12:29:45 +01:00
Mohammad Reza Moradi 08e1e714e7
Merge branch 'main' into reza/send-reaction-on-only-admin-can-send-message-room 2024-12-06 15:36:51 +01:00
Karthikeyan S 9b800db175
fix: rejecting a call doesn't send m.call.reject event 2024-12-06 12:38:58 +05:30
Mohammad Reza Moradi ba9c3e7fc9
Merge branch 'main' into reza/send-reaction-on-only-admin-can-send-message-room 2024-12-05 13:17:53 +01:00
Mohammad Reza Moradi 04612a2296
fix: throw error on failed reaction send 2024-12-05 13:13:47 +01:00
Krille 812c7dde82
refactor: Do not set default timeout for initialSync 2024-12-02 10:48:48 +01:00
Johannes Nevels 7515ff6dbe
feat: support filtering events when requesting events history or future 2024-11-26 13:43:21 +01:00
Krille 989a1cd504
refactor: Do not set the deprecated dont_notify action in push rules
This has been deprecated since
https://spec.matrix.org/v1.7/client-server-api/#actions
An empty list of actions should now
be equal to a list with the entry
"dont_notify". Clients should
ignore this action and use
empty lists instead. A good
explaination can be found
https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/3987-push-actions-clean-up.md
2024-11-25 14:08:45 +01:00
Krille 60d500956c
feat: Add deleteFile() endpoint to database 2024-11-12 08:32:32 +01:00
Krille f46e76295c
fix: BREAKING! Cache members for encrypted rooms in database
This fixes a huge performance
leak as for every encrypted room
the whole member list is loaded
every time you start the client.
This also changes the default value of `cache` in
this method to if the room is encrypted or not.
For encrypted rooms we always want a complete
member list locally.
2024-11-11 11:58:18 +01:00
Mohammad Reza Moradi 9c32193dff
chore: add require trailing comma lint 2024-11-07 16:13:37 +01:00
Krille 3116650210
feat: Optional authentication for profile requests 2024-10-23 12:18:36 +02:00
Krille 9918c5ab8f
feat: Add additional properties for LoginFlow type 2024-10-22 15:03:38 +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 7605b1de31
feat: v1.12 spec endpoints support (BREAKING CHANGE) 2024-10-21 13:58:33 +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 b2e747bb3a
feat: add equality and hashCode overrides for autogenerated models (BREAKING CHANGE) 2024-10-18 14:02:55 +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 2d73192a40
refactor: Use Object.hash instead of hashCode ^ 2024-10-16 15:13:30 +02:00
Nicolas Werner e3d41bb449
fix: properly remove reply fallback from (un)localized body 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
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 13d756856e
refactor: Migrate to m.marked_unread from Matrix v1.12 2024-10-08 15:03:39 +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
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
Krille b913b40fd8
chore: Lower loglevel for call event with unexpected sender 2024-10-07 10:31:29 +02:00
td 140db616d9
feat: BREAKING CHANGE v1.11 matrix-spec endpoints 2024-09-19 14:16:49 +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 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 4c4a062a27
fix: race condition between getState and requestUser updates 2024-08-27 10:04:56 +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
The one with the braid 23704f68b8
fix: SQLCipher dylib location on macOS builds
Signed-off-by: The one with the braid <info@braid.business>
2024-08-21 10:29:14 +02:00
td f79096dfbb
feat: support for authenticated media 2024-08-16 14:35:50 +05:30
Krille a0bfd0c73d
fix: App freezes because of recursive loop with getLocalizedDisplayname() call 2024-08-09 10:17:23 +02:00
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 4eb18f670f
fix: update last event properly on cancel send
also stores status in db
2024-07-31 14:36:25 +05:30
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
td 4c60e04c05
fix: add main thread receipts to event.receipts getter 2024-07-23 20:30:07 +05:30
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
td 73e89966c7
fix: bump database version to v9
clears database to handle any old state seen in history getting applied bug bc336709af
2024-07-18 15:12:42 +05:30
Krille 2e51b450bf
refactor: Better avatar and names for invites
Group chats with no user
avatar should return null for
the room.avatar getter and not
a random hero avatar. This could
otherwise lead to confusion as
it looks like this is a DM which
is not the case.

For the name we should also
not just display the name of
the invitor like in a DM even for
group chats, but some more
additional information. I found
a String for
invites quite useful here as
this would name rooms without
a m.room.name like this:
"Invited by $senderName"
which should be short enough.
The alternative
"You have been invited by $senderName" could be too
long IMO.
2024-07-16 13:12:00 +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
Krille 4fd616bcbf
fix: Correctly store lastEvent in database after decryption 2024-07-02 08:44:46 +02:00
td 869a7f41a9
fix: lastEvent after edit and redact 2024-07-01 21:31:13 +05:30
Krille 6976c426a9
refactor: Remove Matrix Connection Exception
This makes no sense anymore.
In the past we tried to use this
Exception type to have a
unified exception for all
network errors. However, this
is only in use for the custom
request method and for every
other api call it is not. So to
have the same error messages
every time, we should just remove
it.
2024-06-25 15:48:12 +02:00
Krille 29cd5a299a
fix: Type error when uploading room keys 2024-06-25 08:33:35 +02:00
Krille f0ab627031
fix: Return empty uri instead of original uri if uri is not mxc 2024-06-24 13:27:53 +02:00
td 53c75a8dbf
chore: allow clients to set their own voip key delays 2024-06-22 07:34:16 +05:30
Nicolas Werner f13d4e1f45
fix: Request user causing state update loops for apps
This completely redoes the requestUser function.

It now doesn't stop requesting a user forever just because of a network
error. But redundant calls are still deduplicated, however their
parameters are taken into account now.

It also now only calls onUpdate and onRoomState when there is actually
new state. This way apps can just listen to updates to rerender instead
of having to implement the deduplication themselves.

It also now doesn't treat member events without membership as "join"
anymore. And lookup errors don't cause an empty user to get inserted
into the room state.

In general this should still request the profile from the server, if the
displayname is unset in a leave event, but it should also allow the app
to actually settle in the tests.
2024-06-14 12:33:25 +02:00
td 373518557f
chore: make ignored call mem logging verbose 2024-06-11 19:00:44 +05:30
td a540bc6ef7
fix: dont override passed powerlevels with groupcall powerlevels 2024-06-11 19:00:39 +05:30
td 7f41b2d4c8
fix: ignore call events from own user even if todevice 2024-06-11 18:43:18 +05:30
td 325fb19f55
chore: do not create participant object on every key 2024-06-11 18:18:32 +05:30
td 7241bb8dc5
revert: "feat: retry call encryption key request logic"
This reverts commit 9896ebb814.
2024-06-11 18:11:44 +05:30
HuangRed e65d7f94ca
fix: Do not return invalid state events from database 2024-06-11 13:01:28 +02:00
td ef102c4b72
Merge branch 'main' into td/bumpRTCKeyDelays 2024-06-10 18:38:49 +05:30
Nicolas Werner bc336709af
fix: state updates being also applied when fetching history
This could sometimes lead to the room name or the names of members in
the room being incorrect.
2024-06-10 14:51:37 +02:00
td 188eb0f387
chore: bump make and use key delays to have more buffer 2024-06-07 14:55:10 +05:30
td 9896ebb814
feat: retry call encryption key request logic 2024-06-06 01:19:51 +05:30
td 2e1e3a48c7
feat: expose matrixRTCEventStream
currently only supports participant join/leave updates
2024-05-30 18:21:13 +05:30
td 10687d88a1
fix: do not fire missedCall on answeredElseWhere 2024-05-30 15:38:10 +05:30
Krille 4d9b0f6574
fix: Do not return invalid state events from database 2024-05-29 12:07:40 +02:00
Krille 14b8ceb2eb
refactor: requestUser logic 2024-05-29 10:08:46 +02:00
Krille a21ead8cd5
fix: Requst profiles for left users
This has been set to false
to prevent storing global
user profiles as member states
in the database. However
looks like this is already
solved below. We can
safely store the profile
in the local cache, otherwise
we cannot calc the body
for an event synchroniously.
2024-05-29 10:04:32 +02:00
Krille 491313ae7d
refactor: Use enhanced enums for room enums 2024-05-28 14:25:38 +02:00
krille-chan 885aeb3c17
refactor: Deprecate Streams in favor of client.onSync
This deprecates all streams which can
be created by using client.onSync
anyway for a more predictable state
handling in consuming apps.
2024-05-28 13:48:31 +02:00
Nicolas Werner 51dbb90436
fix: canRequestHistory doesn't reflect reality
canRequestHistory could become false, even though you didn't load all
events from the database yet. So you had to either rely on fetching
until the requestHistory method throws or rely on other workarounds.

This makes requestHistory not throw, when the prev_batch is null, but
also makes canRequestHistory return sane values (but might require an
extra request, that does nothing).
2024-05-27 14:55:11 +02:00
td 06728b4b75
fix: make sure room is postLoaded before starting calls
more logging
2024-05-23 14:10:20 +05:30
td 25437f8a18
fix: nonLocal join/left values 2024-05-22 22:55:41 +05:30
td 79960d1be3
fix: Do not set messages as state events anymore
We had this as a workaround and forgot to remove it after the database migration to the new way how to store the last message.
2024-05-22 22:22:56 +05:30
td fd6c7a1016
feat: preShareKey using fetchOrCreateGroupCall
fix: only fire backend.onNewParticipant and backend.onLeftParticipant when it is not the local participant, this fixes the issue where onNewParticipant would get triggered when it detects a new call even though you were not in the call, as of now there is no code in those functions which needs to be triggered before you have joined the call so this should be fine

chore: also improve participants join leave tracking logic
2024-05-22 22:15:00 +05:30
td 48043ec753
feat: hide _makeNewSenderKey and expose a new preShareKey function
also bumps version
2024-05-22 19:06:33 +05:30
td d313cbb18e
feat: make voip key generator public
with this you can now send the key before joining the call to the participants, make sure to call onMemberStateChanged first to ensure groupCall.participants is populated
2024-05-22 18:19:18 +05:30
Krille f3e631b2eb
fix: Hotfix create missing objectbox 2024-05-21 13:07:36 +02:00
td b5fb43af51
chore: add MatrixSDKVoipException and some more logging 2024-05-21 15:47:19 +05:30
td 39a8b8ce89
chore: throw exception if you cannot send famedly call member event 2024-05-21 15:07:44 +05:30
td d10befcac5
fix: allow famedly calls for everyone before choosing an existing one 2024-05-21 15:04:25 +05:30
td d4566d7512
fix: minor perm issue typo while setting famedly call member event 2024-05-21 15:02:30 +05:30
Krille 4d60c8f023
refactor: Make network request timeout
configurable
2024-05-21 08:30:34 +02:00
krille-chan c5e6a89f05
refactor: Combine sendMessageTimeoutSeconds and sendTimelineEventTimeout
Those timeouts were basically the same
and both had the same default value
1 minute. I guess it was just a
mistake to duplicate this.
2024-05-20 16:57:55 +02:00
Karthikeyan S 29e554337c
perf: check event size in bytes without encoding twice 2024-05-20 16:40:15 +02:00
krille-chan 97d544ba85
refactor: Store not uploaded group sessions in its own database queue
This should highly increase the
performance as right now for every sync
ALL inbound group sessions are loaded
from the database and checked if
they need an upload. So if a user
has 10k stored sessions locally, this
would probably let the whole application
lag a lot. This stores the sessions which
need upload in a different table now,
similar how we do this with the to
device queue
2024-05-20 11:28:08 +02:00
Karthikeyan S eef3fd1dfc
fix: update event status to error on EventTooLarge 2024-05-16 19:12:25 +05:30
Krille 93bf30f376
refactor: Make client members read only 2024-05-16 07:23:30 +02:00
Krille 5a79aa9536
refactor: make sure ensureNotSoftLoggedOut does not run multiple times 2024-05-14 10:40:32 +02:00
Krille 3f8a4c8189
feat: Implement unpublished MSC custom refresh token lifetime 2024-05-14 10:40:32 +02:00
Krille 039c214e7a
fix: ensureNotSoftLoggedOut must be called before network reqeust in syncFilter check 2024-05-14 10:13:45 +02:00
td 59703aef75
fix: ice restart mechanism 2024-05-13 22:07:38 +05:30
krille-chan 42f44de2b1
refactor: Cache direct chat matrix ID
The direct chat account data
content is a map from matrixId
to roomId(s). If we want to find
the roomId for a given userId,
then this is not a problem. But
the other way around, if we
want to check if a given roomId
is a direct chat or not, needs to
process all entries which can be
hundreds. Doing this very
often in an app costs a lot of
performance. This adds a simple
cache in the room object and
validates the cache every time
to make this more efficient.
2024-05-10 10:52:27 +02:00
Ray Wang e9825f7f40
feat: support for JWT authentication
Signed-off-by: Krille <c.kussowski@famedly.com>
2024-05-10 10:39:58 +02:00
Krille 1dbb81ed83
chore: Revert check message size before fake sync
This lead to the huge problem that there is no
user feedback between sending a message and
seeing it in the timeline as it is encrypted
before the first user feedback is shown. But
the encryption step is async and also includes
fetching devices if necessary so that can take
seconds or even forever on bad internet
connection.

This reverts commit 981c3ea94d.
2024-05-10 08:22:09 +02:00
Krille 501c457ea1
refactor: delete not sent events without eventupdate stream workaround
This fixes several problems. First
sending a fake event through the
onEventUpdate stream was not a
good design and lead to problems
if you expect a timeline event but
then are unable to build the
event from json. This now uses
a new stream in the Client which
is listened to in the timeline to
delete an event which should be
much more reliable.
It also now throws an exception
if deleting the event fails
instead of returning true or false.
A deprecation note is added.
2024-05-08 12:02:55 +02:00
Krille bf5bf2adb0
refactor: Removes the behavior of deleting an event if the file is no longer cached
This brings more problems than it
helps. It leads to bugs like flickering
of sending images and also
confuses the user. This should
either be handled by the app
or the user.
2024-05-06 14:59:45 +02:00
Krille a1a542d98e
refactor: Create StrippedStateEvents for invite rooms when loading from db 2024-05-06 09:42:05 +02:00
Krille 5b46ae6e31
refactor: Use strippedstatevent as base for room state and user class
Before we have used the Event class for all
state events while for invite rooms those
actually were StrippedStateEvent objects. This
created some problems like we needed to set a
fake originServerTs (usually to DateTime.now()).
Actually we don't need the additional keys for
state events most of the time so just using
StrippedStateEvent for all states and typecasting
them to event where needed is not much of a
hassle while we benefit from a more clear
structure.
This also now uses StrippedStateEvent as a base
class for the User class which makes the User
class more minimal as keys like event_id and
origin_server_ts are no longer necessary. As we
create a lot of fake User objects where we had to
put fake values in it, it brings more benefits
than problems to just get rid of those fields.
2024-05-03 14:06:49 +02:00
Krille 8c98a0058a
ci: Add tests for database on web 2024-05-02 11:18:35 +02:00
td c5b5a1cf14
chore: reduce isValidMemEvent log level 2024-04-30 21:40:43 +05:30
td a2e8830df0
chore: expose fake matrix api 2024-04-30 17:42:36 +05:30
td 0ff643f652
fix: allow mesh group call invite 2024-04-30 17:12:25 +05:30
Krille 7ed809d748
refactor: Remove unused variable 2024-04-30 07:52:43 +02:00
krille-chan a8214832c0
fix: Fetch invite state after restart app
This makes sure that the
users for an invitation are
correctly loaded so that we
can display the avatar, the
room displayname and
wether the room is a direct
chat or not.
2024-04-29 15:33:54 +02:00
td 66bd16208d
chore: update voip readme 2024-04-26 20:07:20 +05:30
morguldir df6c11775d
fix: Don't fail sync if a presence event has an empty presence field 2024-04-26 13:08:01 +02:00
td 20a31c1908
feat: famedly calls 2024-04-23 15:52:35 +05:30
td 281510b950
feat: lcov and tag olm tests 2024-04-23 15:21:46 +05:30
krille-chan 4732580c3d
fix: Make room.setPower more type safe and avoid change powerlevel in RAM before sending request to server
This fixes the bug that the
actual dart Map in the state
has been manipulated because
we have not worked with a
copy of the map. Also this
crashes if the powerlevelmap
would had a wrong type in
users.
2024-04-18 10:56:28 +02:00
krille-chan 00616f02ac
refactor: Use prevBatch from server for pagination in event search
When using the searchEvent()
method it was impossible to
paginate to the next
chunk when one chunk had
0 returned events. This
fixes it by returning the
prevBatch and makes it
possible to insert the prevBatch
again. sinceEventId is still
working but now deprecated.
2024-04-18 10:32:27 +02:00
krille-chan edcf331bf3
fix: canChangePowerLevel should return true for own user 2024-04-17 12:56:34 +02:00
td 24ccf5eeff
fix: remove msc3245 key from audio events
looks like we do not support this anyway and this confuses bridges, basically removes all voice message related things from the sdk
2024-04-12 15:53:13 +05:30
Krille 9099dd74c0
chore: Pass reason parameter when invite user to a room 2024-04-12 11:30:59 +02:00