Hi,
I am subscribed to some lists that do not fill the list-post header,
but have a list-id header. I am not sure how standard-compliant is
that, but it would nice if Sup could identify those messages as list
messages.
Cheers,
Israel
---
lib/sup/message.rb | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index 56e66de..67f928c 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -34,7 +34,7 @@ class Message
attr_reader :id, :date, :from, :subj, :refs, :replytos, :to, :source,
:cc, :bcc, :labels, :attachments, :list_address,
:recipient_email, :replyto,
- :source_info, :list_subscribe, :list_unsubscribe
+ :source_info, :list_subscribe, :list_unsubscribe, :list_id
bool_reader :dirty, :source_marked_read, :snippet_contains_encrypted_content
@@ -120,6 +120,13 @@ class Message
else
nil
end
+
+ @list_id =
+ if header["list-id"]
+ @list_id = header["list-id"].gsub(/^<|>$/, "")
+ else
+ nil
+ end
@recipient_email = header["envelope-to"] || header["x-original-to"] ||
header["delivered-to"]
@source_marked_read = header["status"] == "RO"
@@ -162,7 +169,7 @@ class Message
end
def snippet; @snippet || (chunks && @snippet); end
- def is_list_message?; !...@list_address.nil?; end
+ def is_list_message?; !...@list_address.nil? || !...@list_id.nil?; end
def is_draft?; @source.is_a? DraftLoader; end
def draft_filename
raise "not a draft" unless is_draft?
--
1.6.4
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk