pub mod v1 {
use ruma_common::{
OwnedEventId, OwnedRoomId,
api::{request, response},
metadata,
};
use serde_json::value::RawValue as RawJsonValue;
use crate::authentication::ServerSignatures;
metadata! {
method: GET,
rate_limited: false,
authentication: ServerSignatures,
path: "/_matrix/federation/v1/event_auth/{room_id}/{event_id}",
}
#[request]
pub struct Request {
#[ruma_api(path)]
pub room_id: OwnedRoomId,
#[ruma_api(path)]
pub event_id: OwnedEventId,
}
#[response]
pub struct Response {
pub auth_chain: Vec<Box<RawJsonValue>>,
}
impl Request {
pub fn new(room_id: OwnedRoomId, event_id: OwnedEventId) -> Self {
Self { room_id, event_id }
}
}
impl Response {
pub fn new(auth_chain: Vec<Box<RawJsonValue>>) -> Self {
Self { auth_chain }
}
}
}