X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=lib%2Fsup%2Fmodes%2Fthread-view-mode.rb;h=dfe30ff7c4c49c4d163341aea1cdef87a85416ee;hb=4efc8adaf8c63ff054c71149de6c12fe8194ff03;hp=759191ea5c2466865dfc162690e72d3878498b9c;hpb=ae549917ed4c6ad69b3c3b8cf696c261241cbd7d;p=sup diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb index 759191e..dfe30ff 100644 --- a/lib/sup/modes/thread-view-mode.rb +++ b/lib/sup/modes/thread-view-mode.rb @@ -204,7 +204,7 @@ EOS end end - cmd = case HookManager.run "bounce-command", :from => m.from, :to => to + cmd = case (hookcmd = HookManager.run "bounce-command", :from => m.from, :to => to) when nil, /^$/ then defcmd else hookcmd end + ' ' + to.map { |t| t.email }.join(' ') @@ -212,14 +212,14 @@ EOS bt = to.size > 1 ? "#{to.size} recipients" : to.to_s if BufferManager.ask_yes_or_no "Really bounce to #{bt}?" - Redwood::log "Bounce Command: #{cmd}" + debug "bounce command: #{cmd}" begin IO.popen(cmd, 'w') do |sm| sm.puts m.raw_message end raise SendmailCommandFailed, "Couldn't execute #{cmd}" unless $? == 0 rescue SystemCallError, SendmailCommandFailed => e - Redwood::log "Problem sending mail: #{e.message}" + warn "problem sending mail: #{e.message}" BufferManager.flash "Problem sending mail: #{e.message}" end end @@ -253,7 +253,7 @@ EOS new_labels = BufferManager.ask_for_labels :label, "Labels for thread: ", @thread.labels return unless new_labels - @thread.labels = (reserved_labels + new_labels).uniq + @thread.labels = Set.new(reserved_labels) + new_labels new_labels.each { |l| LabelManager << l } update UpdateManager.relay self, :labeled, @thread.first