improvement: device list works better

The only situation that isn't working yet is sending `left` events for
users when the sender leaves the room
This commit is contained in:
Timo 2020-08-21 21:22:59 +02:00
parent f23fb32e95
commit 4323cf5fec
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
5 changed files with 246 additions and 151 deletions

View file

@ -19,16 +19,9 @@ pub fn search_events_route(
let sender_id = body.sender_id.as_ref().expect("user is authenticated");
let search_criteria = body.search_categories.room_events.as_ref().unwrap();
let filter = search_criteria
.filter
.as_ref()
.unwrap();
let filter = search_criteria.filter.as_ref().unwrap();
let room_id = filter.rooms
.as_ref()
.unwrap()
.first()
.unwrap();
let room_id = filter.rooms.as_ref().unwrap().first().unwrap();
let limit = filter.limit.map_or(10, |l| u64::from(l) as usize);