✨ 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:
committed by
Jeremiah Russell
parent
ef0c9ebd89
commit
4749e83cf3
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user