Restore unsigned.redacted_because
This commit is contained in:
parent
9478050792
commit
b0d775a535
12
src/lib.rs
12
src/lib.rs
@ -122,7 +122,7 @@ use js_int::Int;
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_json::value::RawValue as RawJsonValue;
|
use serde_json::value::RawValue as RawJsonValue;
|
||||||
|
|
||||||
// use self::room::redaction::RedactionEvent;
|
use self::room::redaction::RedactionEvent;
|
||||||
|
|
||||||
#[deprecated = "Use ruma_serde::empty::Empty directly instead."]
|
#[deprecated = "Use ruma_serde::empty::Empty directly instead."]
|
||||||
pub use ruma_serde::empty::Empty;
|
pub use ruma_serde::empty::Empty;
|
||||||
@ -185,9 +185,10 @@ pub struct UnsignedData {
|
|||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub age: Option<Int>,
|
pub age: Option<Int>,
|
||||||
|
|
||||||
// /// The event that redacted this event, if any.
|
/// The event that redacted this event, if any.
|
||||||
// #[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
// pub redacted_because: Option<EventJson<RedactionEvent>>,
|
pub redacted_because: Option<EventJson<RedactionEvent>>,
|
||||||
|
|
||||||
/// The client-supplied transaction ID, if the client being given the event
|
/// The client-supplied transaction ID, if the client being given the event
|
||||||
/// is the same one which sent it.
|
/// is the same one which sent it.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
@ -202,8 +203,7 @@ impl UnsignedData {
|
|||||||
/// an incoming `unsigned` field was present - it could still have been
|
/// an incoming `unsigned` field was present - it could still have been
|
||||||
/// present but contained none of the known fields.
|
/// present but contained none of the known fields.
|
||||||
pub fn is_empty(&self) -> bool {
|
pub fn is_empty(&self) -> bool {
|
||||||
self.age.is_none() && self.transaction_id.is_none()
|
self.age.is_none() && self.transaction_id.is_none() && self.redacted_because.is_none()
|
||||||
// && self.redacted_because.is_none()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user