[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sup-devel] [PATCH] before-add-message now only fires for new messages



---
 lib/sup/poll.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
index 582cd4d..02aa0d3 100644
--- a/lib/sup/poll.rb
+++ b/lib/sup/poll.rb
@@ -130,6 +130,7 @@ EOS
             end
           else
             yield "Found new message at #{m.source_info} with labels #{m.labels.to_a * ','}"
+            HookManager.run "before-add-message", :message => m
             add_new_message m
             loaded_labels.merge m.labels
             num += 1
@@ -173,7 +174,6 @@ EOS
         m.labels.delete :unread if m.source_marked_read? # preserve read status if possible
         m.labels.each { |l| LabelManager << l }
 
-        HookManager.run "before-add-message", :message => m
         yield m
       end
     rescue SourceError => e
-- 
1.6.6

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel