Skip to content
Snippets Groups Projects
Unverified Commit f4c8b773 authored by morguldir's avatar morguldir
Browse files

syncv3: include the invite_state in the response

parent 85400d15
No related branches found
No related tags found
1 merge request!561morguldir/sliding sync fixes
......@@ -1145,7 +1145,7 @@ pub(crate) async fn sync_events_v4_route(
let all_rooms = all_joined_rooms
.iter()
.cloned()
.chain(all_invited_rooms.iter().cloned())
.chain(all_invited_rooms.clone())
.collect();
if body.extensions.to_device.enabled.unwrap_or(false) {
......@@ -1490,6 +1490,16 @@ pub(crate) async fn sync_events_v4_route(
.map(|(_, pdu)| pdu.to_sync_room_event())
.collect();
let invite_state = if all_invited_rooms.contains(room_id) {
services
.rooms
.state_cache
.invite_state(&sender_user, room_id)
.unwrap_or(None)
} else {
None
};
let required_state = required_state_request
.iter()
.map(|state| {
......@@ -1570,7 +1580,7 @@ pub(crate) async fn sync_events_v4_route(
},
initial: Some(roomsince == &0),
is_dm: None,
invite_state: None,
invite_state,
unread_notifications: UnreadNotificationsCount {
highlight_count: Some(
services
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment