🐛 fix(rule_processor): fix label creation and message retrieval
- fix label creation by removing async - fix message retrieval by renaming run to get_messages
This commit is contained in:
committed by
Jeremiah Russell
parent
50a3b394de
commit
b1fc7f713a
@@ -54,7 +54,7 @@ impl RuleProcessor for GmailClient {
|
||||
|
||||
/// Find the rule and messages for the label
|
||||
async fn find_rule_and_messages_for_label(&mut self, label: &str) -> Result<()> {
|
||||
self.add_labels(&[label.to_string()]).await?;
|
||||
self.add_labels(&[label.to_string()])?;
|
||||
|
||||
if self.label_ids().is_empty() {
|
||||
return Err(Error::LabelNotFoundInMailbox(label.to_string()));
|
||||
@@ -141,7 +141,7 @@ impl RuleProcessor for GmailClient {
|
||||
// }
|
||||
/// Prepare the message list for delete to be completed on execute by batch_delete
|
||||
async fn prepare(&mut self, pages: u32) -> Result<()> {
|
||||
self.run(pages).await
|
||||
self.get_messages(pages).await
|
||||
}
|
||||
|
||||
/// Run the batch delete on the selected messages
|
||||
|
||||
Reference in New Issue
Block a user