Add include_user_metadata parameter to Database::general_messages()

The C++ wrapper defaults it to true, so the behaviour hasn't changed for
existing callers that don't pass a value for the evaluateConditions
parameter, i.e. that call GetGeneralMessages().

Since the new parameter comes before evaluateConditions,
existing GetGeneralMessages(true) and GetGeneralMessages(false) calls
need to be replaced with GetGeneralMessages(true, true) and
GetGeneralMessages(true, false) to retain their existing behaviour. The
parameter order was chosen to match that of GetPluginMetadata(), at the
cost of this backwards incompatibility.
This commit is contained in:
Oliver Hamlet
2026-01-02 16:41:43 +00:00
parent f582a513bc
commit 96b2ed2373
9 changed files with 92 additions and 17 deletions
+5 -1
View File
@@ -138,12 +138,16 @@ impl Database {
pub fn general_messages(
&self,
include_user_metadata: bool,
evaluate_conditions: bool,
) -> Result<Vec<Message>, VerboseError> {
self.0
.read()
.map_err(DatabaseLockPoisonError::from)?
.general_messages(to_eval_mode(evaluate_conditions))
.general_messages(
to_merge_mode(include_user_metadata),
to_eval_mode(evaluate_conditions),
)
.map(|v| v.into_iter().map(Into::into).collect())
.map_err(Into::into)
}