commit 5b8724346cfa405b1b4f5cd358595226a79f6b2c
parent 797af34eb246244c88b1923ef907c26f6de6ea43
Author: Ben Walton <bwalton@artsci.utoronto.ca>
Date: Thu, 7 May 2009 17:46:51 -0400
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
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git 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
@@ -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