From: Kevin Riggle Date: Fri, 21 Aug 2009 01:57:42 +0000 (-0400) Subject: add an after-add-message hook X-Git-Url: https://git.cworth.org/git?p=sup;a=commitdiff_plain;h=9ab9dc93ef05d6c0c1b702fe52a177847ff1a6bb add an after-add-message hook I want to do some unrelated processing on each message I receive, but I don't want to block the message being added to the index. This patch adds a hook which runs /after/ the message is added to the index. --- diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb index 8a9d218..fb3aacf 100644 --- a/lib/sup/poll.rb +++ b/lib/sup/poll.rb @@ -11,6 +11,12 @@ Variables: message: the new message EOS + HookManager.register "after-add-message", < messages + rescue SourceError => e Redwood::log "problem getting messages from #{source}: #{e.message}" Redwood::report_broken_sources :force_to_top => true