Commit Graph

57 Commits

Author SHA1 Message Date
Krille 91617c1892
refactor: Make optional eventId a named parameter
This should not break the
API of consuming apps and
is more intuitive as the
parameter is nullable.
2023-04-28 10:03:04 +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
Christian Pauly 7885281c72 refactor: Use import sorter and ci templates 2022-07-21 15:44:04 +02:00
Nicolas Werner 6e211f5a81 fix: race conditions in the SDK and its tests 2022-07-13 00:36:49 +00:00
Henri Carnot fb18843b08 refactor: make sender getter async 2022-06-02 08:13:21 +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
Henri Carnot 09b324674e feat: non cached fragmented timeline 2022-05-03 14:08:33 +00: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 f9875e2929 chore: Bump version 2022-02-08 08:43:19 +01:00
Krille Fear 84e87279e8 fix: Remove onHistoryReceived which was broken anyway 2022-02-07 15:15:44 +01:00
Christian Pauly 846d5b0f46 fix: Add redaction events to timeline
The redaction events should not
be displayed in the GUI but it
is the job of the app to hide
them from the timeline while
the SDK should offer an
accurate list of ALL timeline
events by default.
2022-02-04 08:55:47 +01:00
Christian Pauly c82ae911db chore: Bump version 2022-02-03 10:53:48 +01:00
Krille Fear 3bce8b4489 refactor: Remove unnecessary type checks and imports 2021-12-23 11:46:45 +01:00
Krille Fear 58b36a67a3 refactor: Update matrix_api_lite and use SyncUpdate constructors 2021-11-10 10:04:03 +01:00
Nicolas Werner c443b239b4 Merge branch 'krille/timeline-set-read-marker' into 'main'
refactor: Move setreadmarker functionality to timeline

See merge request famedly/company/frontend/famedlysdk!879
2021-11-09 14:14:43 +00:00
Krille Fear e313426dd9 refactor: Move setreadmarker functionality to timeline
Apps had a hard time to just set
the marker for the last event.
The lastEvent in the Room may
not be the actual last event
because we ignore several
event types there. Therefore
it makes sense to refactor
the setUnread method.
Now the timeline class has an
easy method to set the read
marker to the last synced
event, which can only be
known by the timeline if we
want to avoid another DB access.
2021-11-09 14:56:59 +01:00
Krille Fear e1f93637b3 feat: Add onInsert, onRemove and onUpdate cb to timeline
This makes it finally possible to
use Flutters AnimatedListView with
our Timeline class and in web we
can now update single elements
instead of the whole timeline
on every change which should
be quiet good for the
performance
2021-11-09 09:55:26 +01:00
Nicolas Werner 32c6e0ec6e
refactor: port client and related tests to nullsafety 2021-10-28 03:44:02 +02:00
Jindřich Pikora c6e0359522 refactor: Change event status to enum 2021-10-14 13:31:07 +00: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 9b7474e2f2 refactor: Update to dart 2.12 and opt out in all files
This also adds some missing license headers, I have detected while
using license header search&replace to add the
null safety opt out
2021-08-18 08:09:39 +02:00
Christian Pauly ebc9be250d fix: Mark unsent events as failed
In Moor this was implemented but forgotten in Hive.
Events with status 0 (not sent yet) should be marked as failed on restart.
In fact they should be marked as failed if older than 1 minute. To not have a big startup job which iterates through all events in the database
we just do a time check when opening a room where we iterate through all events anyway.
The new implementation is now in the constructor of the Event and therefore
independent from the database implementation.
2021-07-05 08:37:46 +02:00
Christian Pauly c0c7f68bf3 chore: Rename to matrix 2021-06-18 09:58:25 +02:00
Christian Pauly aa4b0a25fa refactor: Update matrix_api_lite and remove no longer necessary dep override
The logger package has been removed too because the matrix_api_lite no longer
depends on it. It was a unnecessary import anyway because it was transitive in the past.
2021-05-17 07:50:54 +00:00
Lukas Lihotzki c196610998 chore: operation names from OpenAPI spec 2021-05-12 13:56:16 +02:00
Christian Pauly ffef732103 refactor: enable more linter rules
enable prefer_final_locals and prefer_final_in_for_each linter rules
2021-04-14 10:29:29 +02:00
Christian Pauly 0ceb2b26df refactor: Constants names 2021-03-30 12:43:50 +02:00
Krille Fear 0d8bddf708 Merge branch 'soru/fallback-keys' into 'main'
feat: Add fallback keys support

Closes #136

See merge request famedly/famedlysdk!653
2021-03-03 07:38:32 +00:00
Sorunome 498c7825a5
feat: Add fallback keys support 2021-03-02 16:17:32 +01:00
Sorunome 885141968c Merge branch 'krille/refactor-event-update' into 'main'
refactor: Deprecate eventType in EventUpdate

See merge request famedly/famedlysdk!661
2021-02-26 16:11:57 +00:00
Christian Pauly b8659213ae feat: Implement can request history calculation 2021-02-26 13:48:29 +01:00
Christian Pauly c9d3c327f6 refactor: Deprecate eventType in EventUpdate 2021-02-26 13:06:02 +01:00
Christian Pauly 72a7bc1637 feat: Implement upload sync filters 2021-02-18 14:03:58 +01:00
Sorunome 21a5854fbf
fix: Attempt event decryption on fetching replied events 2021-02-02 12:51:43 +01:00
Krille Fear c701268d71 feat: Do well known by default in check homeserver 2021-01-20 13:21:51 +00:00
Sorunome a35266f1e4
feat: Replay last sent olm message on olm session recovery from other device 2021-01-20 12:50:52 +01:00
Christian Pauly e450a09fb5 refactor: External matrix api 2021-01-04 10:26:29 +01:00
Christian Pauly cd4dafcd45 chore: Nicer logs in tests 2020-12-21 14:21:12 +01:00
Christian Pauly 5381c3935c refactor: Check server 2020-10-26 08:33:25 +00:00
Christian Pauly 66e590073e refactor: Event Update Type 2020-10-22 13:01:35 +02:00
Christian Pauly 5019ebfeb5 feat: Auto retry send events 2020-09-21 16:51:40 +00:00
Sorunome b5ac500136
fix: Handle failed to send messages in low network significantly better 2020-09-10 13:19:58 +02:00
Sorunome 20d72eb8d7
fix: Event statuses progress and are saved correctly 2020-08-17 08:54:16 +02:00
Christian Pauly 6779ab6624 Deprecate debug mode 2020-08-06 07:09:32 +00:00
Christian Pauly dc1ed0c6e2 Use SyncUpdate for pending messages 2020-07-30 08:48:47 +00:00
Sorunome c68487ac21 fix issue with sending messages 2020-07-23 08:09:00 +00:00
Christian Pauly 4f2a8febf9 Fix request history 2020-07-21 07:34:30 +00:00
Sorunome f065a92445
fix coverage 2020-06-05 11:32:02 +02:00