lib/sup/message_chunks.rb in sup-0.20.0 vs lib/sup/message_chunks.rb in sup-0.21.0
- old
+ new
@@ -157,10 +157,11 @@
"Attachment: #{filename} (#{lines.length} lines)"
else
"Attachment: #{filename} (#{content_type}; #{@raw_content.size.to_human_size})"
end
end
+ def safe_filename; Shellwords.escape(@filename).gsub("/", "_") end
## an attachment is exapndable if we've managed to decode it into
## something we can display inline. otherwise, it's viewable.
def inlineable?; false end
def expandable?; !viewable? end
@@ -304,15 +305,16 @@
def color; :quote_color end
end
class CryptoNotice
- attr_reader :lines, :status, :patina_text
+ attr_reader :lines, :status, :patina_text, :unknown_fingerprint
- def initialize status, description, lines=[]
+ def initialize status, description, lines=[], unknown_fingerprint=nil
@status = status
@patina_text = description
@lines = lines
+ @unknown_fingerprint = unknown_fingerprint
end
def patina_color
case status
when :valid then :cryptosig_valid_color