sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit b5c1bcbd4c25618574f94e683773647906f023e0
parent ecfdae994dcae9dcc6c554d9157d7ce5f0c6e188
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Sun, 24 Feb 2008 14:31:52 -0800

giving a block to PollManager#each_message_in_source is now optional

The block is only there to allow tweaks to the message before insertion.
It's perfectly useful to call this method without the block.

Diffstat:
M lib/sup/poll.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
@@ -156,7 +156,7 @@ EOS
 
           docid, entry = Index.load_entry_for_id m.id
           HookManager.run "before-add-message", :message => m
-          m = yield(m, offset, entry) or next
+          m = yield(m, offset, entry) or next if block_given?
           Index.sync_message m, docid, entry
           UpdateManager.relay self, :added, m unless entry
         rescue MessageFormatError => e