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