From: Grant Hollingworth Date: Thu, 17 Jan 2008 17:49:21 +0000 (-0500) Subject: renamed "quoteline" hook to "attribution" X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=d639106dad97f0b3322e94e5ba3fee5b40f68fed;p=sup renamed "quoteline" hook to "attribution" --- diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb index 2d05f15..3b8c920 100644 --- a/lib/sup/modes/reply-mode.rb +++ b/lib/sup/modes/reply-mode.rb @@ -10,10 +10,11 @@ class ReplyMode < EditMessageMode :user => "Customized" } - HookManager.register "quoteline", < m) || default_quoteline(m) - lines = quoteline.split("\n") + m.quotable_body_lines.map { |l| "> #{l}" } + attribution = HookManager.run("attribution", :message => m) || default_attribution(m) + lines = attribution.split("\n") + m.quotable_body_lines.map { |l| "> #{l}" } lines.pop while lines.last =~ /^\s*$/ lines end - def default_quoteline m + def default_attribution m "Excerpts from #{@m.from.name}'s message of #{@m.date}:" end