lib/sup/modes/reply_mode.rb in sup-0.22.1 vs lib/sup/modes/reply_mode.rb in sup-0.23
- old
+ new
@@ -34,10 +34,12 @@
Variables:
modes: array of valid modes to choose from, which will be a subset of
[:#{REPLY_TYPES * ', :'}]
The default behavior is equivalent to
([:list, :sender, :recipent] & modes)[0]
+ message: a message object representing the message being replied to
+ (useful values include message.is_list_message? and message.list_address)
Return value:
The reply mode you desire, or nil to use the default behavior.
EOS
def initialize message, type_arg=nil
@@ -128,10 +130,10 @@
refs = gen_references
types = REPLY_TYPES.select { |t| @headers.member?(t) }
@type_selector = HorizontalSelector.new "Reply to:", types, types.map { |x| TYPE_DESCRIPTIONS[x] }
- hook_reply = HookManager.run "reply-to", :modes => types
+ hook_reply = HookManager.run "reply-to", :modes => types, :message => @m
@type_selector.set_to(
if types.include? type_arg
type_arg
elsif types.include? hook_reply