Support synapse quirk for thirdparty module
This commit is contained in:
parent
d1f8a7404c
commit
3869d75837
@ -38,4 +38,4 @@ matches = "0.1.8"
|
||||
[features]
|
||||
unstable-exhaustive-types = []
|
||||
unstable-pre-spec = []
|
||||
unstable-synapse-quirks = []
|
||||
unstable-synapse-quirks = ["ruma-common/unstable-synapse-quirks"]
|
||||
|
@ -24,3 +24,4 @@ matches = "0.1.8"
|
||||
|
||||
[features]
|
||||
unstable-exhaustive-types = []
|
||||
unstable-synapse-quirks = []
|
||||
|
@ -22,7 +22,11 @@ pub struct Protocol {
|
||||
pub location_fields: Vec<String>,
|
||||
|
||||
/// A content URI representing an icon for the third party protocol.
|
||||
#[cfg(not(feature = "unstable-synapse-quirks"))]
|
||||
pub icon: String,
|
||||
/// A content URI representing an icon for the third party protocol.
|
||||
#[cfg(feature = "unstable-synapse-quirks")]
|
||||
pub icon: Option<String>,
|
||||
|
||||
/// The type definitions for the fields defined in `user_fields` and `location_fields`.
|
||||
pub field_types: BTreeMap<String, FieldType>,
|
||||
@ -44,7 +48,11 @@ pub struct ProtocolInit {
|
||||
pub location_fields: Vec<String>,
|
||||
|
||||
/// A content URI representing an icon for the third party protocol.
|
||||
#[cfg(not(feature = "unstable-synapse-quirks"))]
|
||||
pub icon: String,
|
||||
/// A content URI representing an icon for the third party protocol.
|
||||
#[cfg(feature = "unstable-synapse-quirks")]
|
||||
pub icon: Option<String>,
|
||||
|
||||
/// The type definitions for the fields defined in `user_fields` and `location_fields`.
|
||||
pub field_types: BTreeMap<String, FieldType>,
|
||||
|
@ -23,7 +23,10 @@ unstable-exhaustive-types = [
|
||||
"ruma-common/unstable-exhaustive-types",
|
||||
]
|
||||
unstable-pre-spec = ["ruma-client-api/unstable-pre-spec", "ruma-events/unstable-pre-spec"]
|
||||
unstable-synapse-quirks = ["ruma-client-api/unstable-synapse-quirks"]
|
||||
unstable-synapse-quirks = [
|
||||
"ruma-client-api/unstable-synapse-quirks",
|
||||
"ruma-common/unstable-synapse-quirks",
|
||||
]
|
||||
|
||||
appservice-api = ["ruma-api", "ruma-appservice-api", "ruma-events"]
|
||||
client-api = ["ruma-api", "ruma-client-api", "ruma-events"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user