Add Reply-To function - #199
Conversation
mbrt
commented
Sep 27, 2021
Thanks a lot for the contribution! I was trying to test this out, but I couldn't make it work. |
mbrt
commented
Sep 27, 2021
Actually I was wrong, it does seem to work, it's just undocumented. I was able to create a filter that does just that and it seems to work. FFR, here's the exported version: <feedxmlns='http://www.w3.org/2005/Atom'xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters</title>
<id>tag:mail.google.com,2008:filters:...</id>
<updated>2021-09-27T19:35:54Z</updated>
<author>
<name>Me</name>
<email>me@gmail.com</email>
</author>
<entry>
<categoryterm='filter'></category>
<title>Mail Filter</title>
<id>tag:mail.google.com,2008:filter:z...</id>
<updated>2021-09-27T19:35:54Z</updated>
<content></content>
<apps:propertyname='hasTheWord'value='replyto:mbrt/gmailctl'/>
<apps:propertyname='shouldNeverSpam'value='true'/>
<apps:propertyname='sizeOperator'value='s_sl'/>
<apps:propertyname='sizeUnit'value='s_smb'/>
</entry>
</feed> |
mbrt
left a comment
There was a problem hiding this comment.
I'm looking through the changes and they look good!
There's only one place I could see missing:
- README.md, section Tests, about the new
replytofield in the test object.
peteroneilljr
commented
Sep 30, 2021
Hi @mbrt was it as simple as updating the list of fields available for the test object? Or is there an actual test object that needs to be updated? |
mbrt
left a comment
There was a problem hiding this comment.
Tests are also failing. See the results here.
One way to fix this is to do the following:
go test ./... --update
go test ./...
The first command should trigger the regeneration of the golden test files here: https://github.com/mbrt/gmailctl/blob/master/pkg/config/lib_test.go#L18. The second will run all the tests. If nothing fails we should be good to go!
Uh oh!
There was an error while loading. Please reload this page.
peteroneilljr
commented
Sep 30, 2021
Alright, everything should be fixed now. I was updating all of the same files that were updated when BCC was added as an operator and It seems I updated an autogenerated file used by the Go tests. |
mbrt
commented
Oct 2, 2021
Sorry for the delay in responding. Actually the file you updated was good, it's the input to the test. The result is checked against the JSON files that are updated through the commands in the comment above. If you remove it, there's no test for the new field you added, so a future change might break the behavior. Could you please add it back and fix the tests? Then we are truly good to go. |
peteroneilljr
commented
Oct 4, 2021
Ok I think the tests are fixed now! :) |
mbrt
commented
Oct 4, 2021
Thanks for the contribution! :) |
gtback
commented
Oct 4, 2021
Thanks, @peteroneilljr ! |
Adding Reply-To function mentioned in issue #140