From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] [PATCH] Identify list messages by list-id if list-post is not present
Date: Mon, 31 Aug 2009 19:58:47 -0700 [thread overview]
Message-ID: <1251773879-sup-5227@masanjin.net> (raw)
In-Reply-To: <1251192579-sup-1849@elly>
Reformatted excerpts from Israel Herraiz's message of 2009-08-25:
> 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.
Does this patch work for you?
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index ed27d3d..472b9dc 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -114,12 +114,11 @@ class Message
@replytos = (header["in-reply-to"] || "").scan(/<(.+?)>/).map { |x| sanitize_me
@replyto = Person.from_address header["reply-to"]
- @list_address =
- if header["list-post"]
- @list_address = Person.from_address header["list-post"].gsub(/^<mailto:|>$/
- else
- nil
- end
+ @list_address = if header["list-post"]
+ Person.from_address header["list-post"].gsub(/^<mailto:|>$/, "")
+ elsif header["list-id"]
+ Person.from_address header["list-id"].gsub(/^<:|>$/, "")
+ end
@recipient_email = header["envelope-to"] || header["x-original-to"] || header["
@source_marked_read = header["status"] == "RO"
--
William <wmorgan-sup at masanjin.net>
next prev parent reply other threads:[~2009-09-01 2:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 9:31 Israel Herraiz
2009-09-01 2:58 ` William Morgan [this message]
2009-09-01 8:51 ` Israel Herraiz
2009-09-04 13:56 ` William Morgan
2009-09-07 22:46 ` Israel Herraiz
2009-09-08 12:25 ` William Morgan
2009-09-08 12:41 ` Israel Herraiz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1251773879-sup-5227@masanjin.net \
--to=wmorgan-sup@masanjin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox