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 {
/// Convenience method to create a regular `Thread` with the given event ID and latest
/// message-like event ID.
/// Convenience method to create a regular `Thread` relation with the given root event ID and
/// latest message-like event ID.
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 }
}
/// Convenience method to create a reply `Thread` with the given event ID and replied-to event
/// ID.
/// Convenience method to create a reply `Thread` relation with the given root event ID and
/// replied-to event ID.
pub fn reply(event_id: OwnedEventId, reply_to_event_id: OwnedEventId) -> Self {
Self {
event_id,