Kévin Commaille
c4f55b3990
client-api: Fix deserialization of KnockedRoom
...
`knock_state` in `KnockedRoom` and `events` in `KnockState` are no longer
required during deserialization and are no longer serialized if they are empty.
This was a deviation from the spec, those fields were never required.
2025-01-02 18:44:25 -05:00
Jason Volk
ac37db212a
fix lints
...
Signed-off-by: Jason Volk <jason@zemos.net>
2025-01-01 22:20:39 +00:00
Kévin Commaille
09ff0b2819
identifiers: Differentiate one-time and fallback keys from device keys
...
Move the `DeviceKeyAlgorithm::SignedCurve25519` into the new
`OneTimeKeyAlgorithm` type.
Add `(Owned)OneTimeKeyId` and `(Owned)OneTimeKeyName` instead of using
`(Owned)DeviceKeyId`.
2024-11-08 13:02:19 -05:00
strawberry
ade2f1daf0
Merge remote-tracking branch 'upstream/main' into conduwuit-changes
2024-09-28 17:09:18 -04:00
Ivan Enderlin
85b412ffed
client-api: sync::v5::Request::timeline_limit
is not optional. ( #1914 )
...
Contrary to MSC3575, MSC4186 has `timeline_limit` which is not optional.
This patch changes `timeline_limit: Option<UInt>` to `Int` directly.
2024-09-27 08:17:02 +02:00
Ivan Enderlin
463904db31
client-api: Remove sync::v5::Response::initial
. ( #1913 )
...
This patch removes the `initial` field from the `Response` for
MSC4186. There is no top-level `initial` value. This field exists for
`response::Room` though.
2024-09-27 08:16:47 +02:00
strawberry
9900d06765
Merge remote-tracking branch 'upstream/main' into conduwuit-changes
2024-09-17 17:55:49 -04:00
Benjamin Lee
92a35381b5
client-api: fix build when unstable-msc4168 feature is disabled ( #1910 )
...
Without this feature, the v5 module does not exist.
2024-09-16 08:17:11 +02:00
strawberry
b6f82a72b6
Merge remote-tracking branch 'upstream/main' into conduwuit-changes
2024-09-13 16:35:24 -04:00
Ivan Enderlin
7cfa3be0c6
client-api: Implement MSC4186. ( #1907 )
...
* client-api: Derive `Default` for `v4::SyncList`.
* client-api: Implement MSC4186.
2024-09-12 07:12:49 +00:00
morguldir
b432789838
use RoomTypeFilter
instead of Option<RoomType>
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-07 12:19:59 -04:00
strawberry
c8a2d06e24
Merge remote-tracking branch 'upstream/main' into conduwuit-changes
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-06 21:10:32 -04:00
morguldir
d6890ef00c
client-api: use a RoomTypeFilter for syncv3 (not_)room_types filters
...
Signed-off-by: morguldir <morguldir@protonmail.com>
2024-09-05 19:48:18 +00:00
morguldir
f1fbfb12ea
client-api: use RoomType for syncv3 filters instead of strings
...
(cherry picked from commit 5b2ce304010d7c4d1dc1b53af5d49eb1171422ed)
Signed-off-by: morguldir <morguldir@protonmail.com>
2024-09-05 19:48:18 +00:00
morguldir
5b2ce30401
syncv3: use RoomType in sync filters
...
Signed-off-by: morguldir <morguldir@protonmail.com>
2024-08-23 20:45:20 +02:00
Matthias Ahouansou
ef40b184b7
client-api: make user_id of SlidingSyncRoomHero mandatory ( #1832 )
2024-06-05 13:22:08 +02:00
Matthias Ahouansou
f323f4f960
client-api: rename avatar to avatar_url for SlidingSyncRoomHero ( #1833 )
2024-06-05 11:41:26 +02:00
Benjamin Bouvier
75e8829bec
client-api: RoomSummary::heroes
must be OwnedUserId
s, in fact
...
This is imprecise from the spec wording [1], apart from a hint [2], but
these should really be user ids. In practice, this is what Synapse
returns too
[1]https://spec.matrix.org/latest/client-server-api/#_matrixclientv3sync_roomsummary
[2] "The list must never include the client’s own user ID."
2024-05-23 19:41:00 +02:00
Ivan Enderlin
ee5e6b8c9e
feat(client-api): v4::SyncRequestList
has a new include_heroes
field ( #1818 )
2024-05-23 09:57:13 +00:00
Ivan Enderlin
1c1cfe9a7e
feat: Add heros support for sliding sync room. ( #1691 )
...
This patch is only based on https://github.com/matrix-org/sliding-sync/
pull/304 since the specification wasn't updated. I'm basically guessing
what a request and a response _should_ look like:
* `RoomSubscription` gains a new field: `include_heros`,
* `SlidingSyncRoom` gains a new field: `heros`,
* `SlidingSyncRoomHero` is a new type.
2024-05-22 08:14:11 +00:00
Benjamin Lee
16de61357e
client-api: Don't skip the events field serializing timeline in sync response
...
This field is marked as required in the spec. Before
7caa8f2739e38c43effd8a215e788cc1aece13c8, the fact that we had it marked
as `skip_serializing_if` didn't really matter, because we were skipping
the entire timeline object when `events` was empty. Now that we can
serialize timelines with zero events, we always need to include the
field.
2024-05-05 03:09:56 -04:00
Benjamin Lee
3f67772dd3
client-api: Don't skip all no-event timelines serializing sync response
...
There are some cases where a timeline can have zero events but should
still be included in the api response. For example, when calling `/sync`
with a filter that rejects all events after `since`, but does not
necessarily reject all events in the room's history, the response should
include a `prev_batch` field so that the client can search for earlier
events matching the filter using `/messages`.
2024-05-05 03:09:56 -04:00
Benjamin Bouvier
9728f97505
client-api: Use JsOption
for avatar
field in sliding sync response
...
The `avatar` field has different semantics whether it's `undefined` (hasn't
changed since previous time) vs `null` (it's now unset). Let's reflect
this in the API of the `SlidingSyncRoom` response. While a public breaking API
change, sliding sync is still considered experimental, so we're not bumping
the main version here.
2023-11-20 22:47:45 +01:00
Benjamin Bouvier
d3245c287b
client-api: Allow receiving read receipts for all subscribed rooms in sync::v4
...
Given "rooms: '*'", the sliding sync proxy will return read receipts for all the subscribed rooms at any
time. This patch adds safe static support for this option, still allowing individual room ids too.
2023-08-28 18:26:43 +02:00
Jonas Platte
31331f3165
Bring back ruma-events
...
Co-authored-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-08-28 10:23:54 +02:00
Jonas Platte
8e10064364
Enforce import grouping
...
Includes a few manual changes to make rustfmt behave a bit better.
2023-08-22 12:31:49 +02:00
Ivan Enderlin
a9a6e67ed0
client-api: Add timestamp
onto SlidingSyncRoom
...
This has been added in
https://github.com/matrix-org/sliding-sync/pull/247 . This is not part of
the MSC yet.
2023-08-17 11:52:00 +02:00
Ivan Enderlin
201f0027d4
feat: Add SlidingSyncRoom::avatar
...
It's been recently added in the specification, 50ae2c8d65
...kegan/sync-v3.
2023-07-26 16:02:28 +02:00
Jonas Platte
4d9781e05f
client-api: Add missing serde(default)
2023-07-04 13:40:00 +02:00
Benjamin Bouvier
1f8f62ecf6
client-api: Add lists
and rooms
to most extensions in sync::v4
...
Signed-off-by: Benjamin Bouvier <public@benj.me>
2023-06-16 10:41:25 +02:00
Jonas Platte
ba5bf8cfce
Replace assert_matches by assert_matches2
2023-06-08 11:37:11 +02:00
Benjamin Bouvier
e3282d8bfe
client-api: Move the sync v4 bump_event_types
field to the list request
...
… as it's now per-list.
Signed-off-by: Benjamin Bouvier <public@benj.me>
2023-06-01 19:24:05 +02:00
Benjamin Bouvier
89d12fa48a
client-api: Add conn_id
to sync v4 request parameters
...
Signed-off-by: Benjamin Bouvier <public@benj.me>
2023-05-30 11:00:06 +02:00
Jonas Platte
54a4223caa
client-api: Fix type of SlidingSyncRoom#invite_state
2023-04-27 19:27:05 +02:00
Jonas Platte
44ed922ba2
events: Remove unnecessary Option around sliding sync extension types
2023-04-27 17:56:29 +02:00
Ivan Enderlin
fe3a8ff669
feat(client-api): Support bump_event_types
in sync::sync_events::v4::Request
.
...
This patch updates `sync::sync_events::v4::Request` to add the new
`bump_event_types` field, as described in [MSC3575] (more precisely in
this [diff]).
That's the first step to address https://github.com/matrix-org/matrix-rust-sdk/issues/1728 .
[MSC3575]: https://github.com/matrix-org/matrix-spec-proposals/blob/kegan/sync-v3/proposals/3575-sync.md
[diff]: 35b79f6ebe...5bd13e66df (diff-1f7276cbbee4eeaaca06b07d2fe58312eab735259f2490e28e04710dde77fdccL78)
2023-04-06 14:51:25 +02:00
Jonas Platte
f79c51f18f
Fix a typo
2023-03-15 11:07:27 +01:00
kegsay
543c03f8f2
client-api: Use the right EDU types in sliding sync
2023-03-08 13:28:53 +01:00
kegsay
471c46273a
client-api: Fix typo in sliding sync extensions
...
It has always been `receipts` not `receipt`.
2023-03-06 18:42:03 +01:00
Ivan Enderlin
2edfe5bc5f
client-api: Add missing sync::sync_events::v4::Response::txn_id
field
...
In the [specification], if the request contains a `txn_id` value, the response
must echo the same `txn_id`. Unfortunately, this field is missing from
`sync::sync_events::v4::Response::txn_id`. This patch addresses that problem by
adding the missing field.
[specification]: 89cf0341b5/proposals/3575-sync.md
2023-03-01 09:02:53 +00:00
Kévin Commaille
f159776f52
chore: Make all applicable spec links use the latest spec instead of a specific version
2023-02-12 12:39:24 +01:00
Benjamin Kampmann
6cd3935280
client-api: Fix event type inside sync_events::v4 required_state fields
2023-02-08 09:03:31 +01:00
Benjamin Kampmann
00045e559f
client-api: Upgrade to Sliding Sync JSON Layout 0.99
...
… and implement typing and receipt extensions.
2023-01-31 12:48:47 +00:00
Kévin Commaille
ca78825e94
events: rename RoomEventType to TimelineEventType
2023-01-03 10:36:13 +01:00
Matthew Hodgson
8a7ef60c2c
client-api: Derive PartialEq on ExtensionsConfig
...
… to support sticky extensions.
2022-12-29 00:01:12 +01:00
Jonas Platte
3211fccab0
Remove borrowing in requests
2022-11-28 14:02:35 +01:00
Jonas Platte
ae3394a6df
api: Turn metadata name and description fields into docstrings
2022-11-12 10:17:24 +01:00
Jonas Platte
80c060cb69
Remove usage of ruma_api!
2022-11-12 10:17:24 +01:00
Kévin Commaille
045861441a
doc: Update Matrix spec links to v1.4
2022-10-21 10:41:20 +02:00
Timo Kösters
00315d9c48
client-api: Remove serde aliases
2022-10-12 16:52:26 +02:00