Add Database::user_general_messages()

This commit is contained in:
Oliver Hamlet
2026-01-02 16:41:42 +00:00
parent 744586fe96
commit 1d123c8b21
9 changed files with 170 additions and 17 deletions
+12
View File
@@ -148,6 +148,18 @@ impl Database {
.map_err(Into::into)
}
pub fn user_general_messages(
&self,
evaluate_conditions: bool,
) -> Result<Vec<Message>, VerboseError> {
self.0
.read()
.map_err(DatabaseLockPoisonError::from)?
.user_general_messages(to_eval_mode(evaluate_conditions))
.map(|v| v.into_iter().map(Into::into).collect())
.map_err(Into::into)
}
pub fn groups(&self, include_user_metadata: bool) -> Result<Vec<Group>, VerboseError> {
Ok(self
.0