feat(rule_processor): add initialise_message_list to processor

- add initialise_message_list fn to RuleProcessor trait and impl
- ensure rule is only processed on in-scope messages
- call initialise_message_list before processing any labels
This commit is contained in:
Jeremiah Russell
2025-10-28 16:10:03 +00:00
committed by Jeremiah Russell
parent ef0c9ebd89
commit 4749e83cf3
2 changed files with 45 additions and 1 deletions

View File

@@ -497,6 +497,7 @@ async fn run_rules(client: &mut GmailClient, rules: Rules, execute: bool) -> Res
};
log::info!("Executing rule `#{}` for label `{label}`", rule.describe());
client.initialise_message_list();
client.set_rule(rule.clone());
client.set_execute(execute);
if let Err(e) = client.find_rule_and_messages_for_label(&label).await {