Commit Graph

1931 Commits

Author SHA1 Message Date
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