[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sup-talk] reply-from.rb troubles
Excerpts from Cameron Matheson's message of Sun Jan 17 19:30:30 +0100 2010:
> Excerpts from Philipp Überbacher's message of Sun Jan 17 09:40:36 -0700 2010:
> > Now I did:
> > if message.has_label? :mailinglists
> > info "Looks like replying to a mailinglist."
> > Person.from_address "<hollunder@lavabit.com>"
> > a = Person.from_address "<hollunder@lavabit.com>"
> > info 'This is Person.from_address "<hollunder@lavabit.com>": '
> > elsif message.has_label? :murks_lavabit
> > info "Looks like replying with default."
> > Person.from_address "<murks@lavabit.com>"
> > end
> >
> > Which is probably not clever, but I got:
> > [Sun Jan 17 17:38:17 +0100 2010] Looks like replying to a mailinglist.
> > [Sun Jan 17 17:38:17 +0100 2010] This is Person.from_address
> > "<hollunder@lavabit.com>":
> > [Sun Jan 17 17:38:17 +0100 2010] reply-from returned non-Person, using
> > default from.
> >
> > It seems this is trying to tell me what's wrong..
>
> It looks like your hook is now returning the output of info instead of a
> person. Try this:
>
> if message.has_label? :mailinglists
> info "Looks like replying to a mailinglist."
> Person.from_address "<hollunder@lavabit.com>"
> p = Person.from_address "<hollunder@lavabit.com>"
> info "This is person #{p.full_address}"
> p
> elsif message.has_label? :murks_lavabit
> info "Looks like replying with default."
> Person.from_address "<murks@lavabit.com>"
> end
This is the output:
[Sun Jan 17 20:21:19 +0100 2010] Looks like replying to a mailinglist.
[Sun Jan 17 20:21:19 +0100 2010] This is person hollunder
<hollunder@lavabit.com>
btw., does anyone have tips regarding copy/pasting with vim? I always
have to trim lots of whitespace.
Regards,
Philipp
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk