make room directory work

This commit is contained in:
timokoesters 2020-04-09 14:39:50 +02:00
parent 5ac45eac59
commit 11e75e7081
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
2 changed files with 91 additions and 29 deletions

View file

@ -157,13 +157,14 @@ impl Data {
.iter_all()
.keys()
.map(|key| {
serde_json::from_slice(
RoomId::try_from(&*utils::string_from_bytes(
&key.unwrap()
.iter()
.skip(1) // skip "d"
.copied()
.take_while(|&x| x != 0xff)
.take_while(|&x| x != 0xff) // until delimiter
.collect::<Vec<_>>(),
)
))
.unwrap()
})
.collect::<Vec<_>>();