Retrieve individual messages from store

This commit is contained in:
Joscha 2022-08-29 22:57:02 +02:00
parent 7e086258b6
commit bb542ae08e
3 changed files with 54 additions and 0 deletions

View file

@ -79,6 +79,10 @@ impl MsgStore<LogMsg> for Logger {
Path::new(vec![*id])
}
async fn msg(&self, id: &usize) -> Option<LogMsg> {
self.messages.lock().get(*id).cloned()
}
async fn tree(&self, tree_id: &usize) -> Tree<LogMsg> {
let msgs = self
.messages