chore: update ruma again

This commit is contained in:
Timo Kösters 2021-07-20 15:24:18 +02:00
parent 0f8ecdc625
commit f0ac7ed933
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
6 changed files with 35 additions and 39 deletions

View file

@ -11,6 +11,7 @@ use ruma::{
IncomingResponse, OutgoingRequest, SendAccessToken,
},
events::{room::power_levels::PowerLevelsEventContent, EventType},
identifiers::RoomName,
push::{Action, PushConditionRoomCtx, PushFormat, Ruleset, Tweak},
uint, UInt, UserId,
};
@ -299,7 +300,9 @@ async fn send_notice(
.rooms
.room_state_get(&event.room_id, &EventType::RoomName, "")?
.map(|pdu| match pdu.content.get("name") {
Some(serde_json::Value::String(s)) => Some(s.to_string()),
Some(serde_json::Value::String(s)) => {
Some(Box::<RoomName>::try_from(&**s).expect("room name is valid"))
}
_ => None,
})
.flatten();