always allow count to be filled in search response

i fail to see any reason why we would always want
this to be None

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-03 16:42:35 -04:00 committed by June
parent a2ee6b410e
commit 0214caeaea

View file

@ -167,11 +167,7 @@ pub async fn search_events_route(body: Ruma<search_events::v3::Request>) -> Resu
Ok(search_events::v3::Response::new(ResultCategories {
room_events: ResultRoomEvents {
count: if cfg!(feature = "element_hacks") {
Some((results.len() as u32).into())
} else {
None
}, // TODO: set this to none. Element shouldn't depend on it (strawberry: why not?)
count: Some((results.len() as u32).into()),
groups: BTreeMap::new(), // TODO
next_batch,
results,