From: Matthias Vallentin <vallentin@icsi.berkeley.edu>
To: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] message.list_address weirdness
Date: Sun, 02 Jan 2011 08:13:39 -0800 [thread overview]
Message-ID: <1293984326-sup-8884@samurai.icir.org> (raw)
In-Reply-To: <20101227100718.GL60419@icsi.berkeley.edu>
On Dec 27 2010 at 02:07AM PST, Matthias Vallentin wrote:
> I cannot get message.list_address to match to add labels before adding
> messages although the messages definitively have the List-Post header.
Actually, the proposed changes will cause a crash when replying to a
list address (i.e., hitting 'G'), which expects message.list_address to
return a Person object rather than a string containing the email
address. This is inconsistent with the wiki [1] and started my confusion
in the first place. Automatically adding labels for mailing lists would
then change from
if message.list_address =~ /sup-talk/
message.add_label "sup"
message.add_label "list"
end
to
if message.list_address and message.list_address.email =~ /sup-talk/
message.add_label "sup"
message.add_label "list"
end
in order to work correctly. In [1], list_address is documented to be of
type String, which should probably be changed to type Person. I find the
naming (list_address) slightly misleading because it suggest a plain
email address. What about introducing a new member message.list that
returns a Person object and making
message.list_{address,subscribe,unsubscribe} return a string?
Matthias
[1] http://sup.rubyforge.org/wiki/wiki.pl?AutoAddLabelsToNewMessages
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
prev parent reply other threads:[~2011-01-02 16:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-27 10:07 Matthias Vallentin
2011-01-02 16:13 ` Matthias Vallentin [this message]
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=1293984326-sup-8884@samurai.icir.org \
--to=vallentin@icsi.berkeley.edu \
--cc=sup-talk@rubyforge.org \
/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