events: Make docs for Thread constructors a bit more comprehensible

This commit is contained in:
Jonas Platte 2023-10-12 14:52:50 +02:00
parent a3f8c97b33
commit 2708baeed8
No known key found for this signature in database
GPG Key ID: AAA7A61F696C3E0C

View File

@ -107,14 +107,14 @@ pub struct Thread {
} }
impl Thread { impl Thread {
/// Convenience method to create a regular `Thread` with the given event ID and latest /// Convenience method to create a regular `Thread` relation with the given root event ID and
/// message-like event ID. /// latest message-like event ID.
pub fn plain(event_id: OwnedEventId, latest_event_id: OwnedEventId) -> Self { pub fn plain(event_id: OwnedEventId, latest_event_id: OwnedEventId) -> Self {
Self { event_id, in_reply_to: Some(InReplyTo::new(latest_event_id)), is_falling_back: true } Self { event_id, in_reply_to: Some(InReplyTo::new(latest_event_id)), is_falling_back: true }
} }
/// Convenience method to create a reply `Thread` with the given event ID and replied-to event /// Convenience method to create a reply `Thread` relation with the given root event ID and
/// ID. /// replied-to event ID.
pub fn reply(event_id: OwnedEventId, reply_to_event_id: OwnedEventId) -> Self { pub fn reply(event_id: OwnedEventId, reply_to_event_id: OwnedEventId) -> Self {
Self { Self {
event_id, event_id,