federation-api: Add cross-signing fields to get_devices::Response
This commit is contained in:
parent
e7f19b41a7
commit
94dd352cc5
@ -9,7 +9,7 @@ pub mod v1 {
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::encryption::DeviceKeys;
|
||||
use ruma_common::encryption::{CrossSigningKey, DeviceKeys};
|
||||
use ruma_identifiers::{DeviceId, UserId};
|
||||
use ruma_serde::Raw;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -45,6 +45,14 @@ pub mod v1 {
|
||||
|
||||
/// The user's devices.
|
||||
pub devices: Vec<UserDevice>,
|
||||
|
||||
/// The user's master key.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub master_key: Option<Raw<CrossSigningKey>>,
|
||||
|
||||
/// The users's self-signing key.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub self_signing_key: Option<Raw<CrossSigningKey>>,
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +68,13 @@ pub mod v1 {
|
||||
///
|
||||
/// The device list will be empty.
|
||||
pub fn new(user_id: Box<UserId>, stream_id: UInt) -> Self {
|
||||
Self { user_id, stream_id, devices: Vec::new() }
|
||||
Self {
|
||||
user_id,
|
||||
stream_id,
|
||||
devices: Vec::new(),
|
||||
master_key: None,
|
||||
self_signing_key: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user