From 8b1d48618e40409e6ab8fc8dd4314744995228f8 Mon Sep 17 00:00:00 2001 From: Ben Walton Date: Fri, 8 May 2009 21:23:48 -0400 Subject: [PATCH] Small cleanup: Don't use $config in main code. Switched use of $config[:sent_source] to SentManager.source_uri to keep $config use limited to startup/initialization. Signed-off-by: Ben Walton --- lib/sup/poll.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb index d8de5e2..6f9e398 100644 --- a/lib/sup/poll.rb +++ b/lib/sup/poll.rb @@ -137,14 +137,14 @@ EOS def add_messages_from source, opts={} begin return if source.done? || source.has_errors? - + source.each do |offset, labels| if source.has_errors? Redwood::log "error loading messages from #{source}: #{source.error.message}" return end - labels << :sent if source.uri.eql?($config[:sent_source]) + labels << :sent if source.uri.eql?(SentManager.source_uri) labels.each { |l| LabelManager << l } labels = labels + (source.archived? ? [] : [:inbox]) -- 2.45.2