Commit Graph

1705 Commits

Author SHA1 Message Date
Nicolas Werner 48197e2258 chore: Upgrade all dependencies to nullsafe versions 2021-09-10 16:58:32 +02:00
Nicolas Werner e000fbf9be fix: compilation against newer matrix_api_lite 2021-09-10 16:40:40 +02:00
Nicolas Werner 8c22c0108b fix: compile against matrix_api_lite 0.4.2
0.4.3 seems to have accidental breaking changes and breaks our pipeline.
2021-09-10 02:50:24 +02:00
cloudwebrtc ea34f0b82c feat: MSC2746: Improved Signalling for 1:1 VoIP. 2021-09-10 02:50:24 +02:00
Christian Pauly e13b00d127 refactor: Make RoomUpdate class null safe by removing it
RoomUpdate came from a time where we had no data model for
SyncUpdates but now we have and therefore this class is just
code duplication. This removes the class
and uses the SyncRoomUpdate class from
the package matrix_api_lite instead.
It needed a lot of refactoring at some places
where I also have removed some unnecessary null or type checks.
2021-09-08 12:31:55 +00:00
Christian Pauly 5b13e0442e refactor: Make Uri extension null safe 2021-09-08 12:31:55 +00:00
Christian Pauly 92755c07d3 refactor: Don't create dummy User object just to start a new chat 2021-09-08 12:31:55 +00:00
Christian Pauly 3c47b16f22 chore: Bump version 2021-09-08 11:34:19 +02:00
Christian Pauly 210c925a0a fix: Do not handle sending event updates which are already synced
This is an edge case which might occour
on unstable data connections. The user sends an event and receives the sync
before the response to the sending
http request. This leads to duplicated
events while the response actually
should be ignored at this point.
2021-09-08 11:33:36 +02:00
Christian Pauly 8548a3ab28 chore: Bump version 2021-09-06 09:35:58 +02:00
Christian Pauly 646d7e2640 fix: revert make bytes in EncryptedFile nullable 2021-09-06 09:35:53 +02:00
Christian Pauly e684a6d713 chore: Bump version 2021-09-06 09:16:44 +02:00
Christian Pauly 461874d6b1 fix: Remove print 2021-09-06 08:46:29 +02:00
Christian Pauly 2cd32a8547 fix: Make bytes in encrypted file nullable
This was a mistake to make them non nullable. There are fields in the app where
we create this object without bytes.
2021-09-06 08:46:23 +02:00
Christian Pauly 1c7df57b9e chore: Bump version 2021-09-03 15:26:35 +02:00
Christian Pauly 630203e7b6 fix: Check if database got disposed in keyManager 2021-09-03 15:05:34 +02:00
Christian Pauly 524b09c572 feat: Do not load all timeline events from store at once 2021-09-03 14:58:43 +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 803c7598c6 refactor: Workarounds for missing mHeroes in rooms
Normally we do not need a workaround here at all but we had
one in the displayname calculation for
historical reasons. A "good" server should always send the mHeroes correctly.
Instead of removing this workaround completely we do a compromise and implement a more
lightweight alt behaviour by just saying that in a DM room with no
heroes, the directChatMatrixId will be used. This is the same behaviour like in Element
and needs way less lines than before and also covers the avatar
calculation. For Synapse we seem to not need this but for Conduit it
might be helpful.
2021-09-02 07:00:12 +00:00
Christian Pauly fb62307730 fix: Check if client is disposed in a callback
This fixed an edge case in the tests.
2021-09-02 06:43:06 +00:00
Christian Pauly d921f38734 feat: Pin invited rooms
Invitations should always be on top of the
room list. This makes it an optional parameter now which defaults to
true.
2021-09-02 06:43:06 +00:00
Sorunome efb5842959
fix: Implement dummy transactions for hive
That way some concurrency bugs might be fixed, such as if two sync
requests are processed at the same time. That can e.g. happen if you
request history while a sync request is already being processed.
2021-09-01 19:11:46 +02:00
Nicolas Werner 8b46fa3fc2 fix: room account data key/type returned encoded
We uri encode all hive keys. But in some cases we never decode them.
This leads to fun issues like SSSS being unreadable after restart.

fixes https://gitlab.com/famedly/company/frontend/famedlysdk/-/issues/179
2021-09-01 16:37:51 +00:00
Sorunome 33d31cecd1
fix: Missing chatUpdate.prev_batch != null test
We *always* have to update the in-memory prev_batch if it is non-null
2021-09-01 17:42:49 +02:00
Christian Pauly 62694248b9 refactor: Make UIA Request null safe 2021-08-30 09:26:34 +02:00
Christian Pauly efca583cf5 refactor: SyncUpdateExtension null safe 2021-08-30 09:20:17 +02:00
Christian Pauly 8ae77215b5 refactor: SpaceChild and SpaceParent null safe 2021-08-30 09:20:17 +02:00
Christian Pauly dd48a379ec refactor: runInRoot null safe 2021-08-30 09:20:17 +02:00
Christian Pauly 8621f82333 refactor: Null safe receipt 2021-08-30 09:20:17 +02:00
Christian Pauly 2589206851 refactor: Null safe QueuedToDeviceEvent and fix CamelCase filename 2021-08-30 09:20:17 +02:00
Christian Pauly 607658dcda refactor: Null safe QueuedToDeviceEvent and fix CamelCase filename 2021-08-30 09:20:17 +02:00
Christian Pauly 4b9a2945f4 refactor: Null safe multilock 2021-08-30 09:20:17 +02:00
Christian Pauly 0cd73e846d refactor: Null safe matrix localizations 2021-08-30 09:20:17 +02:00
Christian Pauly f311ca62e0 refactor: Make markedUnread null safe 2021-08-30 09:20:17 +02:00
Christian Pauly 1fd40dd186 refactor: Make database null safe 2021-08-30 09:20:17 +02:00
Christian Pauly 5eb2d22207 refactor: Make eventupdate null safe 2021-08-30 09:20:17 +02:00
Christian Pauly d75b27a0cd refactor: Ignore import_of_legacy_library_into_null_safe 2021-08-30 09:20:17 +02:00
Christian Pauly 8f35683120 refactor: Make encryption utils null safe 2021-08-30 09:20:17 +02:00
Christian Pauly 4bee82dbe0 fix: uiaRequests send broken auth object at first try
We should just let the `auth` object null and dont send it at the
first try and wait for the servers response. This worked in the past
but now it is broken because of changes in the
matrix_api_lite. This could also be fault for some
bootstrap issues.
I have also removed an unnecessary check if a String is a String and just made it a
null check because this was intended at this point.

Because of that this blocks uiaRequests it is a hotfix and therefore directly bumps the version.
2021-08-30 08:31:20 +02:00
Sorunome ffb6fd426c
fix: Requesting history being funky
As it turns out, some of the code set the prev_batch for rooms too
early to an empty string. For synapse this means "request from the start",
for conduit it is just an error. This commit fixes that by never resolving
null --> empty string, but instead throw an error.
2021-08-29 12:56:16 +02:00
Sorunome 024e0de4b9
fix: Don't lag when sending messages in big rooms
The old mentionMap was very inefficient to build and scaled badly with
room member size. This resulted in noticable lag when sending any message
in a large room, no matter if it contained a message or not.
Now, the algorithm is severly optimized and mentions (and emotes) are
only loaded when actually used.
2021-08-29 11:43:46 +02:00
Christian Pauly aeea0669d5 fix: Send unencrypted thumbnails
There was just one toString() missing and this
lead to a crash in the app because hive tries to store
an URI.
2021-08-28 17:17:25 +02:00
Christian Pauly 04ff890670 chore: Bump version 2021-08-28 09:55:31 +00:00
Sorunome f3f9b219e1 feat: Cleanup Event.plaintextBody and add [plaintextBody] to Event.getLocalizedBody
It appears that [hideEdit] in Event.getLocalizedBody was written in a way that it
assumes a valid event body. This was also fixed, while also adding tests for the
various parameters of Event.getLocalizedBody
2021-08-28 09:46:03 +00:00
Sorunome b849c828e3
fix: String.parseIdentifierIntoParts not working with unicode matrix.to links
Some clients do not uri-encode the identifier for matrix.to links, so we must
handle if we can't uri-decode them
2021-08-28 11:19:26 +02:00
Jayesh Nirve 4af6763765
fix: missing null check in hideEdit condition 2021-08-27 21:11:06 +05:30
Sorunome 56817df437
fix: missing null check
It seems `device_keys` in the reply of `/keys/query` is not required. While synapse always
sent it, conduit did not, which resulted in an error.
2021-08-27 17:22:54 +02:00
td 7155500594 chore: bump version 2021-08-26 14:03:21 +00:00
Jayesh Nirve 5ac9b6bd73
fix: dartfmt 2021-08-26 03:50:27 +05:30
Jayesh Nirve 0281261a8c
test: add tests to check if last event is set properly 2021-08-26 03:45:39 +05:30