Update ruma to latest, renamed server keys and removed PduStub

This commit is contained in:
Devin Ragotzy 2020-12-04 18:16:17 -05:00 committed by Timo Kösters
parent b869aab5d0
commit 164b1633d8
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
19 changed files with 123 additions and 87 deletions

View file

@ -10,7 +10,8 @@ use ruma::{
room::{guest_access, history_visibility, join_rules, member, name, topic},
EventType,
},
Raw, RoomAliasId, RoomId, RoomVersionId,
serde::Raw,
RoomAliasId, RoomId, RoomVersionId,
};
use std::{cmp::max, collections::BTreeMap, convert::TryFrom};
@ -141,10 +142,14 @@ pub async fn create_room_route(
// 4. Events set by preset
// Figure out preset. We need it for preset specific events
let preset = body.preset.unwrap_or_else(|| match body.visibility {
room::Visibility::Private => create_room::RoomPreset::PrivateChat,
room::Visibility::Public => create_room::RoomPreset::PublicChat,
});
let preset = body
.preset
.clone()
.unwrap_or_else(|| match &body.visibility {
room::Visibility::Private => create_room::RoomPreset::PrivateChat,
room::Visibility::Public => create_room::RoomPreset::PublicChat,
room::Visibility::_Custom(s) => create_room::RoomPreset::_Custom(s.into()),
});
// 4.1 Join Rules
db.rooms.build_and_append_pdu(