fix: synapse complains about missing origin
parent
dd749b8aee
commit
f4078a29eb
|
@ -812,6 +812,12 @@ impl Rooms {
|
||||||
.expect("json is object")
|
.expect("json is object")
|
||||||
.remove("event_id");
|
.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(
|
ruma::signatures::hash_and_sign_event(
|
||||||
globals.server_name().as_str(),
|
globals.server_name().as_str(),
|
||||||
globals.keypair(),
|
globals.keypair(),
|
||||||
|
|
|
@ -42,6 +42,7 @@ impl Sending {
|
||||||
.get_mut("unsigned") {
|
.get_mut("unsigned") {
|
||||||
unsigned.as_object_mut().expect("unsigned is object").remove("transaction_id");
|
unsigned.as_object_mut().expect("unsigned is object").remove("transaction_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
pdu_json
|
pdu_json
|
||||||
.as_object_mut()
|
.as_object_mut()
|
||||||
.expect("json is object")
|
.expect("json is object")
|
||||||
|
|
Loading…
Reference in New Issue