From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 05 Jun 2009 06:37:02 -0700 Subject: [sup-talk] Attempt at reply-from hook In-Reply-To: <1244179379-sup-6675@javelin> References: <1243898254-sup-7513@javelin> <1243980495-sup-7229@cannonball> <1243997614-sup-7485@javelin> <1244029436-sup-6141@ntdws12.chass.utoronto.ca> <1244179379-sup-6675@javelin> Message-ID: <1244208597-sup-4979@entry> Reformatted excerpts from Edward Z. Yang's message of 2009-06-04: > The message.has_label? "mylabel" returns false, as the body of the if > statement never gets logged. (My contention is that the message very > clearly has that label, so wtf). Try has_label? :mylabel. Sup represents labels as symbols instead of as strings. Sorry about that. The hook system is in need of much documentation. A good environment for playing around with this stuff is to run the console: w at drspaceman:~/devel/sup$ sh devel/console.sh [...] >> Index.run_query "label:potato" => [1000] >> m = Index.build_message 1000 => # >> m.labels => [:inbox, :unread, :potato] >> m.has_label? :potato => true >> m.has_label? "potato" => false HTH. -- William