improvement: pdu cache, /sync cache

This commit is contained in:
Timo Kösters 2021-06-30 09:52:01 +02:00
parent dcac1361ec
commit 05821d6fd5
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
16 changed files with 424 additions and 243 deletions

View file

@ -362,7 +362,8 @@ pub async fn upgrade_room_route(
db.rooms
.room_state_get(&body.room_id, &EventType::RoomCreate, "")?
.ok_or_else(|| Error::bad_database("Found room without m.room.create event."))?
.content,
.content
.clone(),
)
.expect("Raw::from_value always works")
.deserialize()
@ -463,7 +464,8 @@ pub async fn upgrade_room_route(
db.rooms
.room_state_get(&body.room_id, &EventType::RoomPowerLevels, "")?
.ok_or_else(|| Error::bad_database("Found room without m.room.create event."))?
.content,
.content
.clone(),
)
.expect("database contains invalid PDU")
.deserialize()