Get a chat conversation given a path to the conversation.
(
&mut self,
path: impl AsRef<Path>,
)
| 383 | |
| 384 | /// Get a chat conversation given a path to the conversation. |
| 385 | pub fn get_conversation_by_path( |
| 386 | &mut self, |
| 387 | path: impl AsRef<Path>, |
| 388 | ) -> Result<Option<ConversationState>, DatabaseError> { |
| 389 | // We would need to encode this to support non utf8 paths. |
| 390 | let path = match path.as_ref().to_str() { |
| 391 | Some(path) => path, |
| 392 | None => return Ok(None), |
| 393 | }; |
| 394 | |
| 395 | self.get_json_entry(Table::Conversations, path) |
| 396 | } |
| 397 | |
| 398 | /// Set a chat conversation given a path to the conversation. |
| 399 | pub fn set_conversation_by_path( |
no test coverage detected