Wrap PDUs in Raw on federation backfill endpoint
Wrap the PDU as done in all the other federation endpoints.
This commit is contained in:
parent
f5a0add846
commit
a85b7031a3
@ -8,6 +8,7 @@ Breaking Changes:
|
|||||||
* Remove `PduStub` (it only existed because of the spec being misleading)
|
* Remove `PduStub` (it only existed because of the spec being misleading)
|
||||||
* Rename `pdu_stub` fields to `pdu`
|
* Rename `pdu_stub` fields to `pdu`
|
||||||
* Upgrade dependencies
|
* Upgrade dependencies
|
||||||
|
* Wrap `Pdu`s in `backfill::get_backfill` in `Raw`
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ use js_int::UInt;
|
|||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
use ruma_events::pdu::Pdu;
|
use ruma_events::pdu::Pdu;
|
||||||
use ruma_identifiers::{EventId, RoomId, ServerNameBox};
|
use ruma_identifiers::{EventId, RoomId, ServerNameBox};
|
||||||
|
use ruma_serde::Raw;
|
||||||
|
|
||||||
ruma_api! {
|
ruma_api! {
|
||||||
metadata: {
|
metadata: {
|
||||||
@ -40,7 +41,7 @@ ruma_api! {
|
|||||||
pub origin_server_ts: SystemTime,
|
pub origin_server_ts: SystemTime,
|
||||||
|
|
||||||
/// List of persistent updates to rooms.
|
/// List of persistent updates to rooms.
|
||||||
pub pdus: Vec<Pdu>,
|
pub pdus: Vec<Raw<Pdu>>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +60,7 @@ impl Response {
|
|||||||
/// * the `server_name` of the homeserver.
|
/// * the `server_name` of the homeserver.
|
||||||
/// * the timestamp in milliseconds of when this transaction started.
|
/// * the timestamp in milliseconds of when this transaction started.
|
||||||
/// * the list of persistent updates to rooms.
|
/// * the list of persistent updates to rooms.
|
||||||
pub fn new(origin: ServerNameBox, origin_server_ts: SystemTime, pdus: Vec<Pdu>) -> Self {
|
pub fn new(origin: ServerNameBox, origin_server_ts: SystemTime, pdus: Vec<Raw<Pdu>>) -> Self {
|
||||||
Self { origin, origin_server_ts, pdus }
|
Self { origin, origin_server_ts, pdus }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user