1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-06-27 16:35:59 +00:00

Support room version 3

This commit is contained in:
Nyaaori 2021-11-01 08:57:27 +00:00
parent 526b5b4d7f
commit 25065a58e8
No known key found for this signature in database
GPG key ID: E7819C3ED4D1F82E
5 changed files with 45 additions and 9 deletions

View file

@ -725,7 +725,7 @@ pub async fn send_transaction_message_route(
for pdu in &body.pdus {
// We do not add the event_id field to the pdu here because of signature and hashes checks
let (event_id, value) = match crate::pdu::gen_event_id_canonical_json(pdu) {
let (event_id, value) = match crate::pdu::gen_event_id_canonical_json(pdu, &db) {
Ok(t) => t,
Err(_) => {
// Event could not be converted to canonical json
@ -1911,7 +1911,7 @@ pub(crate) fn fetch_and_handle_outliers<'a>(
Ok(res) => {
warn!("Got {} over federation", id);
let (calculated_event_id, value) =
match crate::pdu::gen_event_id_canonical_json(&res.pdu) {
match crate::pdu::gen_event_id_canonical_json(&res.pdu, &db) {
Ok(t) => t,
Err(_) => {
back_off((**id).clone());
@ -2815,7 +2815,7 @@ async fn create_join_event(
// let mut auth_cache = EventMap::new();
// We do not add the event_id field to the pdu here because of signature and hashes checks
let (event_id, value) = match crate::pdu::gen_event_id_canonical_json(pdu) {
let (event_id, value) = match crate::pdu::gen_event_id_canonical_json(pdu, &db) {
Ok(t) => t,
Err(_) => {
// Event could not be converted to canonical json