events: Add Thread::without_fallback
There was no constructor that initializes the minimal set of required fields previously.
This commit is contained in:
parent
2708baeed8
commit
fd8e8398ff
@ -1,5 +1,10 @@
|
||||
# [unreleased]
|
||||
|
||||
Improvements:
|
||||
|
||||
- Add `Thread::without_fallback` as a constructor that initializes the minimal
|
||||
set of required fields
|
||||
|
||||
# 0.27.3
|
||||
|
||||
Improvements:
|
||||
|
@ -113,6 +113,12 @@ impl Thread {
|
||||
Self { event_id, in_reply_to: Some(InReplyTo::new(latest_event_id)), is_falling_back: true }
|
||||
}
|
||||
|
||||
/// Convenience method to create a regular `Thread` relation with the given root event ID and
|
||||
/// *without* the recommended reply fallback.
|
||||
pub fn without_fallback(event_id: OwnedEventId) -> Self {
|
||||
Self { event_id, in_reply_to: None, is_falling_back: false }
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user