Skip to content

Why does gmailctl split this kind of "or" filter into separate rules? #372

Description

@dbarnett

I've noticed gmailctl likes to split some "or" conditions into separate filters where I would've expected a single Gmail filter. It's a cosmetic thing, but affects a lot of my filter rules and ends up bloating/obfuscating my Gmail filters list quite a bit in practice.

For example:

{
filter: {
or: [
{ list:'list1.example.com' },
{ cc:'list1@example.com' },
],
},
actions: { archive:true },
},

Will produce:

Filters:
--- Current
+++ TO BE APPLIED
@@ -1 +1,10 @@
+* Criteria:
+ query: list:list1.example.com
+ Actions:
+ archive
+* Criteria:
+ query: cc:list1@example.com
+ Actions:
+ archive
+

instead of a single query list:list1.example.com OR cc:list1@example.com.

Is there a reason for that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureNew feature or requestlifecycle/keep-aliveDenotes an issues or PR that should never be considered stale.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions