add element web search count hack (?)

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-23 23:40:09 -04:00 committed by June
parent f4146de17d
commit c2e89b939c
3 changed files with 10 additions and 6 deletions

View file

@ -106,8 +106,12 @@ pub async fn search_events_route(body: Ruma<search_events::v3::Request>) -> Resu
Ok(search_events::v3::Response::new(ResultCategories {
room_events: ResultRoomEvents {
count: Some((results.len() as u32).into()), // TODO: set this to none. Element shouldn't depend on it
groups: BTreeMap::new(), // TODO
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?)
groups: BTreeMap::new(), // TODO
next_batch,
results,
state: BTreeMap::new(), // TODO