]> git.notmuchmail.org Git - sup/commitdiff
SentManager adds just-sent messages to the index in the standard way
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 24 Feb 2008 22:33:09 +0000 (14:33 -0800)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 24 Feb 2008 22:33:09 +0000 (14:33 -0800)
I.e., using PollManager#add_message_from_source, rather than doing it by
hand. (Symptom: the before-add-message hook wasn't being called for
sent messages.)

lib/sup/sent.rb

index 9c802d9673a4247cff3f0a999b262cfc8edc495e..87b88e01906112e73bb0184baff371c128d4521e 100644 (file)
@@ -22,11 +22,7 @@ class SentManager
       yield f
     end
 
-    @source.each do |offset, labels|
-      m = Message.new :source => @source, :source_info => offset, :labels => @source.labels
-      Index.sync_message m
-      UpdateManager.relay self, :added, m
-    end
+    PollManager.add_messages_from @source
   end
 end