From 5b8724346cfa405b1b4f5cd358595226a79f6b2c Mon Sep 17 00:00:00 2001 From: Ben Walton Date: Thu, 7 May 2009 17:46:51 -0400 Subject: [PATCH] Sent label handling change Make PollManager add the 'sent' label if the source it's collecting messages from is the configured sent source. Remove the sent label from SentLoader, which makes it even less 'special.' Signed-off-by: Ben Walton --- lib/sup/poll.rb | 3 ++- lib/sup/sent.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb index fb4abb2..d8de5e2 100644 --- a/lib/sup/poll.rb +++ b/lib/sup/poll.rb @@ -143,7 +143,8 @@ EOS Redwood::log "error loading messages from #{source}: #{source.error.message}" return end - + + labels << :sent if source.uri.eql?($config[:sent_source]) labels.each { |l| LabelManager << l } labels = labels + (source.archived? ? [] : [:inbox]) diff --git a/lib/sup/sent.rb b/lib/sup/sent.rb index bad2083..935da2a 100644 --- a/lib/sup/sent.rb +++ b/lib/sup/sent.rb @@ -53,7 +53,7 @@ class SentLoader < MBox::Loader def uri; 'sup://sent' end def id; 9998; end - def labels; [:sent, :inbox]; end + def labels; [:inbox]; end end end -- 2.43.0