Commit Graph

518 Commits

Author SHA1 Message Date
td 1ab06cb01a
fix: clear local database on logout even if server timesout 2023-11-13 18:12:47 +05:30
krille-chan b1b2b2ffe2
fix: catch correct exception type for connection problems 2023-11-05 09:52:08 +01:00
Nicolas Werner 37582a3a8e
fix: stale call checker leaks memory 2023-11-04 00:30:14 +01:00
Nicolas Werner 620187c772
Merge branch 'main' into braid/store-left-rooms-in-archive 2023-11-02 08:49:48 +01:00
Krille f0e4232930 refactor: Wait for room in sync until sync process and trigger cleanup call not before actually start clean up. 2023-10-23 12:30:14 +02:00
The one with the braid 5dea95f02c fix: Code style
Signed-off-by: The one with the braid <info@braid.business>
2023-10-20 14:58:56 +02:00
Clemens-Toegel 0ec6a64cc8 chore: store states to archived rooms (#1)
* chore: store states to archived rooms

* chore: PR fix

---------

Co-authored-by: Clemens Toegel <clemens.toegel@x-tention.at>
2023-10-20 14:04:11 +02:00
The one with the braid 053dddb76d chore: incrementally add left rooms to archive
- store left rooms in archive during sync (as well as they are removed
  on join already)
- refactor room archive code
- fix typo

Internal reference: SMC-385

Signed-off-by: The one with the braid <info@braid.business>
2023-10-20 14:04:11 +02: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
Mohammad Reza Moradi c38cbbc8dc
fix: apply state event before decryption on leaved room 2023-09-18 11:33:17 +02:00
Nicolas Werner 5b47a647b6
fix: userOwnsEncryptionKeys returns true for empty device lists 2023-09-13 14:26:41 +02:00
Nicolas Werner cce3646339
fix: startDirectChat might return an unjoined room
If you create DM room, but the other party doesn't join it, they might
be unable to create a new DM using startDirectChat. Since creating a new
DM is pretty much the same as joining the invite, we try to join the
pending DM invite first and fall back to creating a new room if that
fails.
2023-09-04 13:27:55 +02:00
Nicolas Werner 334c9e3b78
refactor: Simplify room sorting logic to make invite sorting more obvious
It wasn't quite obvious that invites were always sorted at the top, if
you just looked at the sort function. This makes it more explicit and
also makes invites always sort before favourited rooms.
2023-07-31 10:55:27 +02:00
Malin Errenst 395ef0eb8e
refactor: Use tryGet for type casts whenever possible 2023-06-21 15:04:46 +02:00
Malin Errenst 5943576b1b
refactor: Added type casts to match refactored matrix_api_lite 2023-06-16 12:42:10 +02:00
Nicolas Werner 663ab11ec5
feat: Support private read receipts
You can either set them to private on the client or overwrite the
behaviour for that on each readMarker call. This also handles incoming
thread receipts and tries its best to figure out what is the latest
receipt. This however breaks the old m.receipt account data event.
2023-04-21 18:31:15 +02:00
Nicolas Werner 7039c33f3a
chore: Upgrade to matrix_api_lite 1.6 2023-04-17 13:23:51 +02:00
Krille 710752060a
feat: Implement onMigration callback to Client.init() method 2023-03-29 15:30:38 +02:00
Philipp Grieshofer 9aff62a18c feat: Expose a getter for all rooms including archived rooms 2023-03-20 13:12:47 +00:00
Nicolas Werner 6f6f6b5d10 Merge branch 'kushal/http-call-issue-fix' into 'main'
fix: http api call replaced with httpClient

See merge request famedly/company/frontend/famedlysdk!1189
2023-03-03 15:21:28 +00:00
Nicolas Werner 99036ca178 Merge branch 'td/stopCheckerLeave' into 'main'
chore: stop stale group call checker on room leave

See merge request famedly/company/frontend/famedlysdk!1245
2023-03-03 12:43:27 +00:00
Nicolas Werner 2c3194b823
fix: archive takes 2 minutes to update
In Synapse 1.62.0 the default cache duration of initial sync responses
was changed to 2 minutes. That means our archive calls might return
stale data. Since different sync timeouts bust through the cache, we
make use of that to be able to load the new archive immediately.

fixes https://gitlab.com/famedly/company/frontend/famedly-web/-/issues/634
2023-03-03 13:08:31 +01:00
m_kushal d48542a023 fix: http api call replaced with httpClient
Signed-off-by: m_kushal <kushalmahapatro@gmail.com>
2023-03-03 01:16:10 +04:00
td fd4577ae84
chore: stop stale group call checker on room leave 2023-02-27 11:53:08 +05:30
td f7c7cb82de
chore: add useServerCache option to fetchOwnProfileFromServer and fix missing awaits 2023-02-20 17:57:29 +05:30
td eca98b14b9
chore: add a fetchOwnProfileFromServer method which tries to get ownProfile from server first, disk then 2023-02-16 19:22:32 +05:30
td 0c9e129347
fix: clean expired member state events in group calls 2023-02-14 23:08:50 +05:30
td 1219604dc9
fix: hasActiveGroup call now checks all group calls
fix: implement activeGroupCallEvents to get all active group call state events in a room

refactor: move staleCallChecker and expires_Ts stuff to an extension on Room, instead of Voip because it makes much more sense per room rather than on voip, also makes testing easier

fix: populate local groupCalls list on instantiating VOIP()

fix: starting stale call checker is now handled by the sdk itself because clients can forget to do so
2023-02-14 15:02:28 +05:30
Krille 05c945b042 fix: Last message set incorrectly on all session key received
This fixes a bug that the
last message was sent
incorrectly when a session
key received for example
from the key backup. It may
fix several issues like the
last message is set as a
very old one or the last
message is not decrypted.
2023-01-18 11:46:32 +01:00
Krille Fear 956a2f793f fix: Add timeout to sync http call 2022-12-27 09:30:04 +01:00
TheOneWithTheBraid 3cc4cd8410 fix: follow account kind in registration
- as of now, account kind ist simply ignored

Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
2022-11-22 07:53:59 +01:00
Grieshofer Philipp d60a3aa579 refactor: Add argument for custom CreateRoomPreset to startDirectChat method 2022-11-14 11:07:53 +01:00
Christian Pauly 7caab4d086 chore: Follow up fix for request users in invite rooms 2022-11-14 08:27:47 +01:00
Christian Pauly 0a6a813804 refactor: Get rid of unnecessary type cast 2022-11-07 11:09:20 +01:00
td aa03f5aa06
fix: filter list for adding p2p call events 2022-10-28 21:52:02 +05:30
Christian Pauly 6c307980a5 fix: Do not wait for first sync after migration init
If the first sync fails because of
a connection problem then the
migration is lost. This should not
happen.
2022-10-26 11:54:33 +02:00
Christian Pauly 7b1a519de0 fix: Do not assume that push rules are never malformed in account data 2022-10-21 10:48:40 +02:00
Nicolas Werner 99c77b9276 Merge branch 'nico/decryption-queue' into 'main'
feat: Implement a queue for events pending decryption

Closes famedly-web#535

See merge request famedly/company/frontend/famedlysdk!1143
2022-10-18 14:02:48 +00:00
Christian Pauly 69f82b2619 refactor: Remove unused imports 2022-10-18 11:42:11 +02:00
Nicolas Werner f55bb4776a feat: Support evaluating pushrules
fixes #339
2022-10-17 04:29:20 +02:00
Christian Pauly 779c278854 refactor: Use DateTime method instead of comparing milliseconds 2022-10-12 11:33:00 +02:00
Nicolas Werner c6a8f5a162 feat: Implement a queue for events pending decryption
fixes https://gitlab.com/famedly/company/frontend/famedly-web/-/issues/535
2022-10-12 11:07:50 +02:00
Nicolas Werner c3ec0ffa2a fix: messages not being processed after a new encryption event. 2022-09-29 12:18:18 +02:00
Christian Pauly dd375eddfd feat: Add getter for own unverified devices 2022-09-21 10:23:01 +02:00
henri2h 7b61f8eb01 fix: don't assume redacts attribute from content to be valid 2022-09-12 17:09:29 +02:00
Nicolas Werner 2b58ec2902 Merge branch 'krille/fix-get-push-rules' into 'main'
fix: Get push rules crashes if malformed

See merge request famedly/company/frontend/famedlysdk!1124
2022-09-09 10:14:35 +00:00
Nicolas Werner ab73047e51 fix: timeout when sending large files
fixes https://gitlab.com/famedly/company/frontend/famedly-web/-/issues/540
2022-09-06 21:18:53 +02:00
Christian Pauly 9a8da3c1e6 fix: Get push rules crashes if malformed 2022-09-06 20:19:52 +02:00
Nicolas Werner abbc474480 fix: Check ahead of download if a file exceeds the maximum file size
fixes https://gitlab.com/famedly/company/frontend/famedly-web/-/issues/539
2022-09-06 11:52:30 +02:00
Nicolas Werner 163ad0de6b fix: The initial sync waiting for a long time in some cases 2022-08-30 14:22:09 +02:00
Christian Pauly 0c107cf917 refactor: Remove databaseDestroyer
The need for a database destroyer
is gone since we have switched
from sqflite/moor to Hive. Removing
it is the first step to a major
refactoring to make the database
not nullable anymore.
2022-08-30 11:00:48 +02:00
Nicolas Werner dd1f61c29e feat: support dehydrated devices 2022-08-29 13:05:55 +02:00
Nicolas Werner 6555f36d6d feat: switch from pedantic to lints 2022-08-15 14:15:51 +00:00
cloudwebrtc 9695a5ad10 chore: Use onRoomState to monitor group call creation and member join and leave. 2022-08-08 22:50:43 +08:00
Lanna Michalke 501ee5dce1 Merge branch 'td/add_startGroupCall' into 'main'
fix: check for m.call permissions in groupCallEnabled

See merge request famedly/company/frontend/famedlysdk!1088
2022-08-01 09:07:27 +00:00
td f56e0ddb5f
fix: check for m.call permissions in groupCallEnabled 2022-08-01 14:27:10 +05:30
Lanna Michalke 05ff61ac86 chore: introduce native implementations
- adds Client.nativeImplementations
 - deprecates Client.compute

Allows to properly implement accelerated native operations in web

Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
2022-07-28 13:30:22 +02:00
Henri Carnot 2a019eaec3 feat: keep timeline history for archive rooms in memory 2022-07-21 14:14:17 +00:00
td f04d8a9f40 Merge branch 'krille/import-sorter' into 'main'
refactor: Use import sorter and ci templates

See merge request famedly/company/frontend/famedlysdk!1079
2022-07-21 13:59:05 +00:00
Christian Pauly 7885281c72 refactor: Use import sorter and ci templates 2022-07-21 15:44:04 +02:00
Krille Fear 50ef19b8a8 Merge branch 'isabella/create-chat-with-powerlevel' into 'main'
Isabella/create chat with powerlevel

See merge request famedly/company/frontend/famedlysdk!1078
2022-07-14 08:32:39 +00:00
Nicolas Werner 6e211f5a81 fix: race conditions in the SDK and its tests 2022-07-13 00:36:49 +00:00
Isabella Hundstorfer 2e649fdcf9 Add powerLevelContentOverride to startDirectChat and createGroupChat 2022-07-12 12:55:11 +02:00
Christian Pauly 7e06d0f578 fix: Cache user profile even with cache=false when there is a cache 2022-07-11 10:48:22 +02:00
Christian Pauly ff359aedff refactor: Better fetch own profile
This makes it possible to pass cache
and getFromRooms variable in
fetchOwnProfile. It also removes the
never working and duplicated
check from rooms. The Profiles
can be duplicated in the Set
because they are equal but not
the same objects. In the get
profile method, it now checks the
cache first before the rooms as
the cache might have the more
accurate result.
This makes displaying an avatar
change much easier as it makes
it possible to just disable cache
then.
2022-07-11 08:08:40 +02:00
Krille Fear 2a280cec98 Merge branch 'krille/share-keys-with-unknown-devices' into 'main'
feat: Calc encryption health state and allow key sharing with unknown devices

Closes #307

See merge request famedly/company/frontend/famedlysdk!1072
2022-07-09 07:50:32 +00:00
Christian Pauly 28231936b1 feat: Calc encryption health state and allow key sharing with unknown devices
In order to allow key sharing with
unknown devices (master key has been
verified but this device is not
signed by this master key) the
user should at least be informed.
This makes it possible to set
in the client constructor whether
the app should share keys with
unverified devices or unknown
devices.
2022-07-09 09:39:31 +02:00
Krille Fear c070a7ed40 Merge branch 'krille/refactor-handle-ephemerals' into 'main'
refactor: Handle Ephemerals method

Closes #306

See merge request famedly/company/frontend/famedlysdk!1064
2022-07-08 16:20:51 +00:00
Christian Pauly 211c366662 refactor: Use tryGet in handleRoomEvents 2022-06-30 15:33:20 +02:00
Christian Pauly 5b831fcc83 refactor: Handle Ephemerals method
This makes sure that the handle
ephemerals method becomes fully
type and null safe, does not handle
maps directly anymore and stores
the corresponding fake m.read
room account data only once
per sync.
2022-06-30 09:39:34 +02:00
Christian Pauly 9628095ac9 feat: Implement CachedStreamController
This makes it possible to access the last
value of a stream at any time.
2022-06-30 09:22:53 +02:00
Christian Pauly 0f17fec3f4 fix: Only trigger onCall streams by latest call event for a call_id
This should fix that calls can get
started on
2022-06-29 09:00:01 +02:00
Christian Pauly c591c1d4b5 refactor: Use handleRoomEvents method instead of handleEvent
This makes it easier to update
the state by a whole timeline.
2022-06-28 14:09:12 +02:00
Christian Pauly fc229c5715 refactor: Pass BasicEvent to handleEvent instead of JSON 2022-06-28 14:09:12 +02:00
Christian Pauly c4cdf6ab4e refactor: Call handleEphemerals with BasicRoomEvent instead of dynamic 2022-06-28 14:09:12 +02:00
Christian Pauly a1c6bc7551 refactor: Let _handleRoomEvents use BasicEvent
This is the first step to reduce
the use of pure json in the
sync method.
2022-06-28 14:09:12 +02:00
Duan Weiwei e2efa3e758 Support group call. 2022-06-13 15:26:25 +00:00
Christian Pauly 58cfd1f688 refactor: Rename methods and get rid of all Future getter 2022-06-08 08:30:05 +02:00
Christian Pauly b00b1636d1 fix: Do not show seen events in push notification 2022-06-07 16:34:07 +02:00
Christian Pauly 4692c95910 feat: Allow overriding supportedVersions 2022-06-07 08:53:08 +02:00
Henri Carnot 2d018d3d5f feat: added waitForSync method 2022-05-25 10:53:52 +00:00
Lanna Michalke dd76e652bf fix: buggy e2e test
Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
2022-05-23 14:40:19 +02:00
Lanna Michalke 039062bfdf feat: implement session export
- implement session export
- implement session import

Please note, this is not device dehydration but a fully offline session
dump eligible for e.g. TOR users.

Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
2022-05-23 12:06:31 +02:00
Krille Fear 3f3d4d38d6 refactor: Migrate to Matrix Api Lite 1.0.0 2022-05-17 22:50:04 +00:00
Henri Carnot bfdd4c810e Henri/fragmented timeline v2 2022-05-16 10:54:42 +00:00
Krille Fear 9a87850092 Revert "feat: non cached fragmented timeline"
This reverts commit 09b324674e
2022-05-12 09:46:29 +02:00
Christian Pauly ac293c29c6 chore: Move auth object passing to external msc implementations 2022-05-09 14:32:08 +02:00
Nicolas Werner 907a0d2317 feat: Store timestamp in the presence events
This fixes the presence never being accurate in the app.
2022-05-06 13:04:31 +02:00
Henri Carnot 09b324674e feat: non cached fragmented timeline 2022-05-03 14:08:33 +00:00
Lanna Michalke ac16724841 chore: make Client.accountData read-only
- for external access, Client.accountData should be read only
- added corresponding getter and private Map

Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
2022-05-03 03:29:20 +02:00
Christian Pauly bce45cbf2b refactor: Remove old deprecations
They have been lived long
enough and the next version
will have breaking changes
anyway.
2022-04-22 12:44:45 +02:00
Christian Pauly eefc40e2d0 refactor: Get rid of dynamic input in checkHomeserver
This also fixes the automatic
homeserver detection in the
login method. It no longer uses
the deprecated user.
2022-04-21 15:40:21 +02:00
Christian Pauly b7e0d10b5a fix: Wait for keys in pusher 2022-04-14 19:44:19 +02:00
Christian Pauly 5973e629fe feat: Get event from push notification 2022-04-14 17:01:05 +02:00
Krille Fear e97fe621d6 chore: Allow custom image resizer to be an async method 2022-04-04 14:35:23 +02:00
Christian Pauly 445252b3a5 feat: Pass through a custom image
resize function to the client

This allows the use of the
native imaging package in a more
easy way.
2022-03-30 10:35:17 +02:00
Krille Fear 23e0d29a0d Merge branch 'krille/try-again-sending' into 'main'
feat: Try again uploading file events for one minute

See merge request famedly/company/frontend/famedlysdk!986
2022-03-30 06:38:01 +00:00
Christian Pauly f86b242dcf feat: Try again uploading file events for one minute
This also refactors the code for
sending events with the same
Duration of one minute.
2022-03-25 12:54:42 +01:00
Christian Pauly abddbee24c feat: Set loglevel in client constructor
This is just more convenient than
doing it in a line after the constructor.
2022-03-25 12:12:43 +01:00
Nicolas Werner 62780b5b2f Merge branch 'krille/fix-reactions-trigger-notifications' into 'main'
fix: Dont encrypt reactions

See merge request famedly/company/frontend/famedlysdk!974
2022-03-15 10:40:52 +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
Nicolas Werner 83298cc98b fix: own profile containing mxid
There are a few ways to fix this. We could skip events, where we don't
have the state in memory yet or always do a /profile request and cache
that.

I chose to go with loading the event from the database if necessary. If
we have a room in the db, we should have our memberevent in the db. In
some cases we might not (if the server thinks our memberevent is super
redundant), but I think the spec doesn't really allow that and it
doesn't happen in practice. And even if it would, we probably would want
our member event ASAP. And if we have no rooms, we fetch it from the
server as before instead of constructing a member with an MXID as the
username.

fixes https://gitlab.com/famedly/company/frontend/frontend-issue-inbox/-/issues/65
2022-03-15 02:13:09 +01:00
Krille Fear 58f77cacdb fix: Rooms sort order after login
A two years old workaround prevented
the room sorting for the initial sync. But
this is definitely no longer needed.
2022-02-28 12:19:33 +01:00
Krille Fear ecc60efea9 fix: Change password using email authentication 2022-02-19 13:37:35 +01:00
Krille Fear 1f8691dd70 Merge branch 'krille/thumbnail-size' into 'main'
chore: Increase default thumbnail size to 800

See merge request famedly/company/frontend/famedlysdk!968
2022-02-19 11:16:08 +00:00
Krille Fear d780ba77c4 chore: Increase default thumbnail size to 800 2022-02-19 11:29:10 +01:00
Christian Pauly c0ec4c3990 fix: sortRooms should be triggered right before onSync is called 2022-02-18 12:11:10 +01:00
Krille Fear 6b610d0115 feat: Return homeserver summary on checkHomeserver 2022-02-16 07:07:53 +00:00
Christian Pauly 68fcee98cb fix: Show reactions as last events and refactor hasNewMessage
Reactions are triggering push
notifications and should therefore
be displayed as last events
in the room list of a client.
The body should just display
the reaction key.
This fixes that rooms with
new reactions can't set to
read.
2022-02-14 15:06:22 +01:00
Christian Pauly 843afe7aa4 fix: Sort rooms after updating the UI on web
FluffyBox behaves different on
web transactions which leads
to the result that _sortRooms()
is performed before the
rooms UI can be there. This
leads to an unsorted room list
on web.
2022-02-14 09:30:33 +01:00
MTRNord d77d49430a fix: Remove sorts that shouldnt be required. 2022-01-15 21:54:13 +01:00
Krille Fear b472dd7b92 fix: Room Member updates should always be cached
I think the commit which broke it was this: e3bd0cf1 It makes sure that only important state events get cached and room member events are not important state events and so new invites have no room member events cached. It makes sense to also allow room member events here to always be cached as they are special typed.
2022-01-08 10:44:22 +01:00
Krille Fear 3bce8b4489 refactor: Remove unnecessary type checks and imports 2021-12-23 11:46:45 +01:00
Sorunome fa5abfca92
fix: ignore 4xx errors when re-sending the to_device queue
The to_device queue was introduced to ensure integrity if e.g. the
server temporarily failed when attempting to send a to_device message.
If, for whatever reason, the server responds with a 4xx error, though,
then we want to ignore that to_device message from the queue and move on,
as that means that something different was fundamentally wrong. This
helps to fix the to_device queue clogging up, making clients incapable
of sending to_device events anymore, should such clogging happen.
2021-12-08 13:00:53 +01:00
Sorunome e3bd0cf139
fix: Only save state events from sync processing in-memory if needed
If we dump all state events from sync into memory then we needlessly
clog up our memory, potentially running out of ram. This is useless
as when opening the timeline we post-load the unimportant state events
anyways. So, this PR makes sure that only the state events of post-loaded
rooms and important state events land in-memory when processing a sync
request.
2021-12-06 11:09:50 +01:00
Krille Fear 43d5b1c523 fix: Add missing calcDisplayname global rules to client constructor
This two parameters were
already documented but
were missing in the
constructor. They can
also be final.
2021-12-03 12:34:52 +01:00
Krille Fear fe2d184faf fix: userOwnsEncryptionKeys always returns true
Actually the homeserver sends an
empty object in the deviceKeys map
so we need to check if this object
is there but is empty.
2021-11-28 10:37:56 +01:00
Krille Fear 44934d5911 Merge branch 'krille/enable-e2eerecovery' into 'main'
chore: Enable E2EE recovery by default

See merge request famedly/company/frontend/famedlysdk!915
2021-11-26 13:05:13 +00:00
Krille Fear ac06864627 feat: Migrate olm sessions on database migration
This adds a getAllOlmSessions
endpoint to the database API and
implements them in both
implementations. This also
adds it to the database
migration.
2021-11-26 08:17:43 +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 79b74e2bbf fix: Remove user avatar 2021-11-25 09:00:59 +01:00
Krille Fear ee21121a63 fix: Workaround for null boolean
deviceKeysList.outdated is not nullable but we have seen this error
in production: `Failed assertion: boolean expression must not be null`
So this could either be a null safety bug in Dart or a result of
using unsound null safety. The extra equal check `== true` should
safe us here
2021-11-23 13:53:07 +01:00
Krille Fear 3338da4e09 fix: Ability to remove avatar from room and account
To remove an avatar the
client needs to send an
empty object. This is now
possible by making the
MatrixFile parameter nullable.
2021-11-22 19:36:38 +01:00
Krille Fear 27c03b4fad fix: Request history in archived rooms
We have just forgotten to
set the prevBatch token in
the room object.
2021-11-22 10:37:26 +01:00
Krille Fear c8c4562f70 fix: Dont enable e2ee without encryption support
This also adds a missing visibility
parameter to the
createGroupChat method.
2021-11-13 11:58:07 +01:00
Krille Fear 9abe1ed81d fix: Dont enable e2ee in test verification DM room 2021-11-09 15:42:43 +01:00
Krille Fear 4cf88e2be6 feat: More advanced create chat methods
This includes a new simplified
API to create new direct and
group chats. It also handles
enabling encryption by
default.
2021-11-09 15:39:42 +01:00
Krille Fear 475e810523 feat: Make waiting on init db optional
This can improve the start-up time of apps.
The three big db reads on init are
loading account data, rooms and
device keys.
This makes it now possible to let
them run parallel
(while it may depend on platform
if this has any effect)
and the init() method can skip
awaiting them. They will
be at least awaited before handling
the first received sync.
So the app can already display the
room list before device keys are
loaded and request the first sync
from the server before anything
else is loaded from the DB.
2021-11-09 15:27:48 +01:00
Krille Fear 315ed7bdcb feat: Add more benchmarks for sync, timeline, init
This also disables benchmarks if loglevel is higher than debug.
2021-11-09 10:03:59 +01:00
Krille Fear 3e1aee6fcd fix: Null error in get own profile
On converting a User object to
a Profile object now leads to an
error. This fixes it.
2021-11-05 12:21:48 +01:00
Nicolas Werner 7d78233bf0
refactor: remove literal boolean comparisons leftover from nullsafety conversion 2021-10-28 14:40:22 +02:00
Nicolas Werner 6e20c53b01
refactor: remove redundant null checks 2021-10-28 14:32:09 +02: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
Krille Fear 9193950970 fix: Auto update room states
Room states are ignored if the event with the same event ID
is already known in the database. But
because of the event is stored in the
database and after this
setState in the Room class is called,
an event is always "known" and
therefore auto updating was broken.
2021-10-25 10:55:54 +02:00
Jayesh Nirve 77ca7523d0 refactor: remove unused clientId 2021-09-24 16:05:05 +02:00
Christian Pauly 0125272b7e fix: Autodetect mimetype on file upload 2021-09-22 07:59:45 +02:00
Krille Fear e0e09c2f67 feat: Add waitForFirstSync parameter to init method
Just using the .init() method to wait for the client
to initialize is a more easy way than listen to onLoginStateChanged.
But by default it waits for the first sync.
This should be configurable.
2021-09-20 11:41:40 +02:00
Sorunome fe9145d580 fix: missing null check 2021-09-18 07:50:45 +00:00
Jindra d8f642372e fix: missing content-type when changing avatar 2021-09-15 09:35:58 +02:00
Krille Fear 1e2ccabe85 fix: Missing null fallback when update notificationCount
Previously when using RoomUpdate in the constructor the notificationCount to update
was never null and set to 0 if it was missing. Now that we are
no longer using it, I forgot to
add the null fallback at this point.
This leads to serious crashes in the apps at runtime
and thats why I bump the version here as well!
2021-09-13 16:42:55 +02:00
Christian Pauly 00771fc209 refactor: _updateUserDeviceKeys method 2021-09-13 14:58:07 +02:00
Krille Fear 56af96c7ea fix: Get direct chat from user ID method
The method was not type safe and therefore there
was no warning that with the sortOrder changes
now DateTimes are compared which leads to
an exception in the app if not using converting to milliseconds first.
2021-09-13 13:53:37 +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 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 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 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
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
Jayesh Nirve 42614bdfbd
Merge branch 'main' of gitlab.com:famedly/company/frontend/famedlysdk into td/fix-lastevent-preview 2021-08-26 02:42:36 +05:30