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

fix: synapse complains about missing origin

parent dd749b8a
No related branches found
No related tags found
No related merge requests found
......@@ -812,6 +812,12 @@ pub async fn build_and_append_pdu(
.expect("json is object")
.remove("event_id");
// Add origin because synapse likes that (and it's required in the spec)
pdu_json
.as_object_mut()
.expect("json is object")
.insert("origin".to_owned(), globals.server_name().as_str().into());
ruma::signatures::hash_and_sign_event(
globals.server_name().as_str(),
globals.keypair(),
......
......@@ -42,6 +42,7 @@ pub fn start_handler(&self, globals: &super::globals::Globals, rooms: &super::ro
.get_mut("unsigned") {
unsigned.as_object_mut().expect("unsigned is object").remove("transaction_id");
}
pdu_json
.as_object_mut()
.expect("json is object")
......
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