Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ExcludeChats #115

Open
pdex opened this issue Apr 29, 2020 · 2 comments
Open

Support for ExcludeChats #115

pdex opened this issue Apr 29, 2020 · 2 comments
Labels
kind/feature New feature or request lifecycle/keep-alive Denotes an issues or PR that should never be considered stale.

Comments

@pdex
Copy link

pdex commented Apr 29, 2020

One of my filters is using ExcludeChats a search of the github repo provides no additional documentation for why this field is unsupported and what the consequences are for interacting with that rule with gmailctl.

I'm curious how much effort it would take to add support for ExcludeChats or if it's just something that can't be done with gmailctl.

Thank you for your time.

Warning: Error getting one or more filters from Gmail: 1 error occurred:
	* importing filter "ANe1BmgJQFCHcYwLSwcmCDVO3pmuyTe_e3fX_Qhe-ons_xT8SqrclVTB1ygddXI3BN_OnbC53Q": importing criteria: criteria: usage of unsupported field "ExcludeChats" (value true)

They will be ignored in the diff.
@mbrt
Copy link
Owner

mbrt commented May 1, 2020

The filter you see in the error will be "ignored in the diff", which is to say it won't be touched by gmailctl. I should make this more clear.

The problem with ExcludeChats is that it seems to be a bit special. All other parameters (from, to, has:attachment, etc) could be represented in the Gmail API by using the dedicated field in the FilterCriteria or by using an expression in the Query field. This seems to be not true for ExcludeChats, so filters with -in:chats in the Query field seem to be different w.r.t. filters that use the ExcludeChats field explicitly. Adding support for this would be then a bit more work than usual.

With that said, could you try and see whether removing that filter manually from the Gmail UI and replacing it with the following works for you?

{
  filter: {
    query: '-in:chats',
  },
  actions: {
    // ... something
  },
},

@mbrt mbrt changed the title Please add more documentation around unsupported fields Support for ExcludeChats May 1, 2020
@mbrt mbrt added the kind/feature New feature or request label May 1, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2020

This issue is stale because it has been open for 30 days without activity.
This will be closed in 7 days, unless you add the 'lifecycle/keep-alive' label or comment.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity, has become stale and will be auto-closed. label Jun 1, 2020
@mbrt mbrt added lifecycle/keep-alive Denotes an issues or PR that should never be considered stale. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity, has become stale and will be auto-closed. labels Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request lifecycle/keep-alive Denotes an issues or PR that should never be considered stale.
Projects
None yet
Development

No branches or pull requests

2 participants