]> git.cworth.org Git - sup/commitdiff
Sent label handling change
authorBen Walton <bwalton@artsci.utoronto.ca>
Thu, 7 May 2009 21:46:51 +0000 (17:46 -0400)
committerBen Walton <bwalton@artsci.utoronto.ca>
Thu, 28 May 2009 15:27:25 +0000 (11:27 -0400)
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 <bwalton@artsci.utoronto.ca>
lib/sup/poll.rb
lib/sup/sent.rb

index fb4abb2526771422579020407bb0ba671391485a..d8de5e2acd319fdbd73c864891ee70266ce93fcc 100644 (file)
@@ -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])
 
index bad20837a825d0109fbf3f363022a3b8f44fd323..935da2ac156c6619bd5bf1d7d799c3fd2eb700c9 100644 (file)
@@ -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