client-api: Fix the type of unused_expires_at for create_mxc_uri
This commit is contained in:
parent
0e5503ed88
commit
67019c7f48
@ -7,10 +7,9 @@ pub mod unstable {
|
|||||||
//!
|
//!
|
||||||
//! [spec]: https://github.com/tulir/matrix-doc/blob/asynchronous_uploads/proposals/2246-asynchronous-uploads.md
|
//! [spec]: https://github.com/tulir/matrix-doc/blob/asynchronous_uploads/proposals/2246-asynchronous-uploads.md
|
||||||
|
|
||||||
use js_int::UInt;
|
|
||||||
use ruma_common::{
|
use ruma_common::{
|
||||||
api::{request, response, Metadata},
|
api::{request, response, Metadata},
|
||||||
metadata, OwnedMxcUri,
|
metadata, MilliSecondsSinceUnixEpoch, OwnedMxcUri,
|
||||||
};
|
};
|
||||||
|
|
||||||
const METADATA: Metadata = metadata! {
|
const METADATA: Metadata = metadata! {
|
||||||
@ -34,13 +33,14 @@ pub mod unstable {
|
|||||||
pub content_uri: OwnedMxcUri,
|
pub content_uri: OwnedMxcUri,
|
||||||
|
|
||||||
/// The time at which the URI will expire if an upload has not been started.
|
/// The time at which the URI will expire if an upload has not been started.
|
||||||
pub unused_expires_at: UInt,
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub unused_expires_at: Option<MilliSecondsSinceUnixEpoch>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Response {
|
impl Response {
|
||||||
/// Creates a new `Response` with the given MXC URI which expires at a given point in time.
|
/// Creates a new `Response` with the given MXC URI.
|
||||||
pub fn new(content_uri: OwnedMxcUri, unused_expires_at: UInt) -> Self {
|
pub fn new(content_uri: OwnedMxcUri) -> Self {
|
||||||
Self { content_uri, unused_expires_at }
|
Self { content_uri, unused_expires_at: None }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user