client-api: Move blurhash to unstable-msc2448
This commit is contained in:
parent
695b0c9ef4
commit
b9f32bc632
@ -46,6 +46,7 @@ Improvements:
|
|||||||
* Move reason support for leaving room out of `unstable-pre-spec`
|
* Move reason support for leaving room out of `unstable-pre-spec`
|
||||||
* Move room type support out of `unstable-pre-spec`
|
* Move room type support out of `unstable-pre-spec`
|
||||||
* Move knocking support out of `unstable-pre-spec`
|
* Move knocking support out of `unstable-pre-spec`
|
||||||
|
* Move blurhash support to `unstable-msc2448`
|
||||||
|
|
||||||
# 0.12.3
|
# 0.12.3
|
||||||
|
|
||||||
|
@ -22,8 +22,7 @@ rustdoc-args = ["--cfg", "docsrs"]
|
|||||||
[features]
|
[features]
|
||||||
compat = []
|
compat = []
|
||||||
unstable-exhaustive-types = []
|
unstable-exhaustive-types = []
|
||||||
# feature dependency required for r0::room::create_room::CreationContent::into_event_content
|
unstable-msc2448 = []
|
||||||
unstable-pre-spec = ["ruma-events/unstable-pre-spec"]
|
|
||||||
client = []
|
client = []
|
||||||
server = []
|
server = []
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ ruma_api! {
|
|||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
||||||
#[ruma_api(query)]
|
#[ruma_api(query)]
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(default, skip_serializing_if = "ruma_serde::is_default", rename = "xyz.amorgan.blurhash")]
|
#[serde(default, skip_serializing_if = "ruma_serde::is_default", rename = "xyz.amorgan.blurhash")]
|
||||||
pub generate_blurhash: bool,
|
pub generate_blurhash: bool,
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ ruma_api! {
|
|||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ impl<'a> Request<'a> {
|
|||||||
file,
|
file,
|
||||||
filename: None,
|
filename: None,
|
||||||
content_type: None,
|
content_type: None,
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
generate_blurhash: false,
|
generate_blurhash: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ impl Response {
|
|||||||
pub fn new(content_uri: Box<MxcUri>) -> Self {
|
pub fn new(content_uri: Box<MxcUri>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
content_uri,
|
content_uri,
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
blurhash: None,
|
blurhash: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ ruma_api! {
|
|||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ impl Response {
|
|||||||
pub fn new(avatar_url: Option<Box<MxcUri>>) -> Self {
|
pub fn new(avatar_url: Option<Box<MxcUri>>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
avatar_url,
|
avatar_url,
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
blurhash: None,
|
blurhash: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ ruma_api! {
|
|||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ impl Response {
|
|||||||
Self {
|
Self {
|
||||||
avatar_url,
|
avatar_url,
|
||||||
displayname,
|
displayname,
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
blurhash: None,
|
blurhash: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ ruma_api! {
|
|||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<&'a str>,
|
pub blurhash: Option<&'a str>,
|
||||||
}
|
}
|
||||||
@ -59,7 +59,7 @@ impl<'a> Request<'a> {
|
|||||||
Self {
|
Self {
|
||||||
user_id,
|
user_id,
|
||||||
avatar_url,
|
avatar_url,
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
blurhash: None,
|
blurhash: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,12 +110,12 @@ unstable-exhaustive-types = [
|
|||||||
unstable-pdu = ["ruma-events/unstable-pdu"]
|
unstable-pdu = ["ruma-events/unstable-pdu"]
|
||||||
unstable-pre-spec = [
|
unstable-pre-spec = [
|
||||||
"ruma-common/unstable-pre-spec",
|
"ruma-common/unstable-pre-spec",
|
||||||
"ruma-client-api/unstable-pre-spec",
|
|
||||||
"ruma-events/unstable-pre-spec",
|
"ruma-events/unstable-pre-spec",
|
||||||
"ruma-federation-api/unstable-pre-spec",
|
"ruma-federation-api/unstable-pre-spec",
|
||||||
"ruma-state-res/__unstable-pre-spec", # for tests
|
"ruma-state-res/__unstable-pre-spec", # for tests
|
||||||
]
|
]
|
||||||
unstable-msc2448 = [
|
unstable-msc2448 = [
|
||||||
|
"ruma-client-api/unstable-msc2448",
|
||||||
"ruma-events/unstable-msc2448",
|
"ruma-events/unstable-msc2448",
|
||||||
"ruma-federation-api/unstable-msc2448"
|
"ruma-federation-api/unstable-msc2448"
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user