federation-api: Wrap events jn get_missing_events in Raw

This commit is contained in:
Timo Kösters 2020-10-18 11:25:24 +02:00 committed by GitHub
parent 50eb700571
commit 6f821835f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
use js_int::{uint, UInt}; use js_int::{uint, UInt};
use ruma_api::ruma_api; use ruma_api::ruma_api;
use ruma_common::Raw;
use ruma_events::pdu::Pdu; use ruma_events::pdu::Pdu;
use ruma_identifiers::{EventId, RoomId}; use ruma_identifiers::{EventId, RoomId};
@ -38,7 +39,7 @@ ruma_api! {
#[derive(Default)] #[derive(Default)]
response: { response: {
/// The missing PDUs. /// The missing PDUs.
pub events: Vec<Pdu> pub events: Vec<Raw<Pdu>>
} }
} }
@ -61,7 +62,7 @@ impl<'a> Request<'a> {
impl Response { impl Response {
/// Creates a new `Response` with the given events. /// Creates a new `Response` with the given events.
pub fn new(events: Vec<Pdu>) -> Self { pub fn new(events: Vec<Raw<Pdu>>) -> Self {
Self { events } Self { events }
} }
} }