events: Remove custom event relations from public API

This commit is contained in:
Jonas Platte 2021-04-13 12:35:13 +02:00
parent 72394655fd
commit 58b8797961
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -237,7 +237,8 @@ pub enum Relation {
}, },
/// Custom, unsupported relation. /// Custom, unsupported relation.
Custom(JsonValue), #[doc(hidden)]
_Custom(JsonValue),
} }
impl From<Relation> for RelatesToJsonRepr { impl From<Relation> for RelatesToJsonRepr {
@ -252,7 +253,7 @@ impl From<Relation> for RelatesToJsonRepr {
RelatesToJsonRepr::Relation(RelationJsonRepr::Replacement(r)) RelatesToJsonRepr::Relation(RelationJsonRepr::Replacement(r))
} }
Relation::Reply { in_reply_to } => RelatesToJsonRepr::Reply { in_reply_to }, Relation::Reply { in_reply_to } => RelatesToJsonRepr::Reply { in_reply_to },
Relation::Custom(c) => RelatesToJsonRepr::Custom(c), Relation::_Custom(c) => RelatesToJsonRepr::Custom(c),
} }
} }
} }
@ -267,7 +268,7 @@ impl From<RelatesToJsonRepr> for Relation {
RelationJsonRepr::Replacement(r) => Self::Replacement(r), RelationJsonRepr::Replacement(r) => Self::Replacement(r),
}, },
RelatesToJsonRepr::Reply { in_reply_to } => Self::Reply { in_reply_to }, RelatesToJsonRepr::Reply { in_reply_to } => Self::Reply { in_reply_to },
RelatesToJsonRepr::Custom(v) => Self::Custom(v), RelatesToJsonRepr::Custom(v) => Self::_Custom(v),
} }
} }
} }