lib/sup/modes/forward-mode.rb in sup-0.12.1 vs lib/sup/modes/forward-mode.rb in sup-0.13.0
- old
+ new
@@ -5,11 +5,11 @@
def initialize opts={}
header = {
"From" => AccountManager.default_account.full_address,
}
- header["Subject"] =
+ header["Subject"] =
if opts[:message]
"Fwd: " + opts[:message].subj
elsif opts[:attachments]
"Fwd: " + opts[:attachments].keys.join(", ")
end
@@ -18,11 +18,11 @@
header["Cc"] = opts[:cc].map { |p| p.full_address }.join(", ") if opts[:cc]
header["Bcc"] = opts[:bcc].map { |p| p.full_address }.join(", ") if opts[:bcc]
body =
if opts[:message]
- forward_body_lines(opts[:message])
+ forward_body_lines(opts[:message])
elsif opts[:attachments]
["Note: #{opts[:attachments].size.pluralize 'attachment'}."]
end
super :header => header, :body => body, :attachments => opts[:attachments]
@@ -30,11 +30,11 @@
def self.spawn_nicely opts={}
to = opts[:to] || (BufferManager.ask_for_contacts(:people, "To: ") or return if ($config[:ask_for_to] != false))
cc = opts[:cc] || (BufferManager.ask_for_contacts(:people, "Cc: ") or return if $config[:ask_for_cc])
bcc = opts[:bcc] || (BufferManager.ask_for_contacts(:people, "Bcc: ") or return if $config[:ask_for_bcc])
-
+
attachment_hash = {}
attachments = opts[:attachments] || []
if(m = opts[:message])
m.load_from_source! # read the full message in. you know, maybe i should just make Message#chunks do this....
@@ -62,10 +62,10 @@
end
protected
def forward_body_lines m
- ["--- Begin forwarded message from #{m.from.mediumname} ---"] +
+ ["--- Begin forwarded message from #{m.from.mediumname} ---"] +
m.quotable_header_lines + [""] + m.quotable_body_lines +
["--- End forwarded message ---"]
end
end