fix(tasks): properly find current position when futures are involved
This commit is contained in:
parent
e0d241ec5a
commit
629db66018
|
@ -151,8 +151,8 @@ impl Tasks {
|
|||
pub(crate) fn len(&self) -> usize { self.tasks.len() }
|
||||
|
||||
pub(crate) fn get_position(&self) -> Option<EventId> {
|
||||
self.history.get(&self.sender.pubkey())
|
||||
.and_then(|tree| tree.last())
|
||||
self.history_until(Timestamp::from(Timestamp::now() + Self::MAX_OFFSET))
|
||||
.last()
|
||||
.and_then(|e| referenced_events(e))
|
||||
.cloned()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue