Skip to content
Snippets Groups Projects
Unverified Commit a8231eef authored by Timo Kösters's avatar Timo Kösters
Browse files

fix: alias parsing

parent 8773e501
No related branches found
No related tags found
No related merge requests found
......@@ -1668,8 +1668,10 @@ pub fn room_aliases(&self, room_id: &RoomId) -> impl Iterator<Item = Result<Room
.scan_prefix(prefix)
.values()
.map(|bytes| {
Ok(serde_json::from_slice(&bytes?)
.map_err(|_| Error::bad_database("Alias in aliasid_alias is invalid."))?)
Ok(utils::string_from_bytes(&bytes?)
.map_err(|_| Error::bad_database("Invalid alias bytes in aliasid_alias."))?
.try_into()
.map_err(|_| Error::bad_database("Invalid alias in aliasid_alias."))?)
})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment