mirror of
https://github.com/element-hq/synapse
synced 2024-10-02 08:02:41 +00:00
Add some notes from pairing
This commit is contained in:
parent
aa5f54aa13
commit
5c175d5488
2 changed files with 19 additions and 2 deletions
|
@ -764,6 +764,13 @@ class SlidingSyncHandler:
|
|||
room_id=room_id,
|
||||
# We're going to paginate backwards from the `to_token`
|
||||
from_key=to_token.room_key,
|
||||
# We should always return historical messages (outside token range) in
|
||||
# these cases because clients want to be able to show a basic screen of
|
||||
# information:
|
||||
# - Initial sync (because no `from_token`)
|
||||
# - When users newly_join
|
||||
# - TODO: For incremental sync where we haven't sent it down this
|
||||
# connection before
|
||||
to_key=from_token.room_key if from_token is not None else None,
|
||||
direction=Direction.BACKWARDS,
|
||||
# We add one so we can determine if there are enough events to saturate
|
||||
|
@ -824,14 +831,23 @@ class SlidingSyncHandler:
|
|||
|
||||
required_state = []
|
||||
if len(room_sync_config.required_state) > 0:
|
||||
required_state = await self.storage_controllers.state.get_state_at(
|
||||
await self.storage_controllers.state.get_current_state(
|
||||
room_id,
|
||||
to_token,
|
||||
state_filter=StateFilter.from_types(TODO),
|
||||
await_full_state=False,
|
||||
)
|
||||
|
||||
# TODO: rewind
|
||||
|
||||
# required_state = await self.storage_controllers.state.get_state_at(
|
||||
# room_id,
|
||||
# to_token,
|
||||
# state_filter=StateFilter.from_types(TODO),
|
||||
# )
|
||||
|
||||
return SlidingSyncResult.RoomResult(
|
||||
# TODO: Dummy value
|
||||
# TODO: Make this optional because a computed name doesn't make sense for translated cases
|
||||
name="TODO",
|
||||
# TODO: Dummy value
|
||||
avatar=None,
|
||||
|
|
|
@ -1021,6 +1021,7 @@ class SlidingSyncRestServlet(RestServlet):
|
|||
# shared between invite and knock rooms, see
|
||||
# https://github.com/matrix-org/matrix-spec-proposals/pull/3575#discussion_r1117629919
|
||||
serialized_rooms[room_id]["invite_state"] = room_result.stripped_state
|
||||
# TODO: `knocked_state` but that isn't specced yet
|
||||
|
||||
return serialized_rooms
|
||||
|
||||
|
|
Loading…
Reference in a new issue