antifuchs / gmail-britta

Generate complex gmail filters via a neat little ruby DSL
MIT License
758 stars 33 forks source link

Allow multiple labels #24

Closed lekv closed 6 years ago

lekv commented 6 years ago

Sometimes I find that I want multiple labels attached through the same filter. GMail doesn't support that, but we could issue the same filter repeatedly for each label.

antifuchs commented 6 years ago

So! This is a perfect example for chaining filters, and rudimentary support exists for this by using .also:

filter {
  to "me@example.com"
  has "what"

  label "questions"
}.also {
  label "mysteries"
}

Unfortunately, .also is quite buggy, as chaining filters don't fully support merging all the criteria yet. I'm working on that!

antifuchs commented 6 years ago

I have now made #27 to support better filter chaining. Feel free to test that branch out - I'll leave the PR open for a while and cut a new release if it doesn't break for you (:

antifuchs commented 6 years ago

27 is merged now - I'd still love to hear any feedback you have on it (:

lekv commented 6 years ago

Apologies for the late reply. I'll check out the new branch and .also and will report any issues.

lekv commented 6 years ago

I tried the recent HEAD and the generated filters are the same as the previous version I had used (736078d).