mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
MSC3575: allow empty conn_id
This commit is contained in:
parent
64ad940bad
commit
ede39370a4
2 changed files with 13 additions and 23 deletions
|
|
@ -83,9 +83,7 @@ pub(crate) async fn sync_events_v4_route(
|
|||
};
|
||||
|
||||
if globalsince == 0 {
|
||||
if body.conn_id.is_some() {
|
||||
services().users.forget_sync_request_connection(&connection_key);
|
||||
}
|
||||
services().users.forget_sync_request_connection(&connection_key);
|
||||
}
|
||||
|
||||
let known_rooms =
|
||||
|
|
@ -377,14 +375,12 @@ pub(crate) async fn sync_events_v4_route(
|
|||
},
|
||||
);
|
||||
|
||||
if body.conn_id.is_some() {
|
||||
services().users.update_sync_known_rooms(
|
||||
connection_key.clone(),
|
||||
list_id,
|
||||
new_known_rooms,
|
||||
globalsince,
|
||||
);
|
||||
}
|
||||
services().users.update_sync_known_rooms(
|
||||
connection_key.clone(),
|
||||
list_id,
|
||||
new_known_rooms,
|
||||
globalsince,
|
||||
);
|
||||
}
|
||||
|
||||
let mut known_subscription_rooms = BTreeSet::new();
|
||||
|
|
@ -405,14 +401,12 @@ pub(crate) async fn sync_events_v4_route(
|
|||
known_subscription_rooms.remove(&r);
|
||||
}
|
||||
|
||||
if body.conn_id.is_some() {
|
||||
services().users.update_sync_known_rooms(
|
||||
connection_key.clone(),
|
||||
"subscriptions".to_owned(),
|
||||
known_subscription_rooms,
|
||||
globalsince,
|
||||
);
|
||||
}
|
||||
services().users.update_sync_known_rooms(
|
||||
connection_key.clone(),
|
||||
"subscriptions".to_owned(),
|
||||
known_subscription_rooms,
|
||||
globalsince,
|
||||
);
|
||||
|
||||
let mut rooms = BTreeMap::new();
|
||||
for (
|
||||
|
|
|
|||
|
|
@ -70,10 +70,6 @@ impl Service {
|
|||
&self,
|
||||
connection_key: ConnectionKey,
|
||||
) -> BTreeMap<String, BTreeMap<OwnedRoomId, u64>> {
|
||||
if connection_key.connection.is_none() {
|
||||
return BTreeMap::new();
|
||||
};
|
||||
|
||||
let cached = self.get_cache_entry(connection_key);
|
||||
let cached = cached.lock().unwrap();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue