feat: implement server ACLs

This commit is contained in:
Timo Kösters 2022-01-17 14:35:38 +01:00
parent d434dfb3a5
commit ee8e72f7a8
No known key found for this signature in database
GPG key ID: 356E705610F626D5
10 changed files with 150 additions and 58 deletions

View file

@ -74,11 +74,11 @@ pub async fn send_message_event_route(
}
let mut unsigned = BTreeMap::new();
unsigned.insert("transaction_id".to_owned(), body.txn_id.clone().into());
unsigned.insert("transaction_id".to_owned(), body.txn_id.to_string().into());
let event_id = db.rooms.build_and_append_pdu(
PduBuilder {
event_type: EventType::from(&body.event_type),
event_type: EventType::from(&*body.event_type),
content: serde_json::from_str(body.body.body.json().get())
.map_err(|_| Error::BadRequest(ErrorKind::BadJson, "Invalid JSON body."))?,
unsigned: Some(unsigned),