-
Notifications
You must be signed in to change notification settings - Fork 297
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
v1: add support for raw search fields #334
base: v1
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #334 +/- ##
==========================================
+ Coverage 73.4% 73.52% +0.11%
==========================================
Files 32 32
Lines 3516 3531 +15
==========================================
+ Hits 2581 2596 +15
Misses 642 642
Partials 293 293
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks sane. Though, I think it is better to think about adding support for raw fields in the SEARCH command. There are more Gmail-specific search keys: X-GM-MSGID, X-GM-THRID, X-GM-LABELS.
Agreed. I really don't want to support GMail's nonstandard flags upstream. |
@emersion @foxcpp I've made some changes to generalize the raw search functionality. Originally I had Raw as a |
Actually I don't think this will work. As is my current approach adds parenthesis around the value which Gmail doesn't interpret as a good command.
I'll have to go back to the drawing board with this and correct my issue. |
I've pushed up a better solution that I'm happy with. |
Hi there!
This is my first contribution to this library and I will say it's quite powerful!
I dug around this morning looking for ways to add arbitrary raw attributes to the search queries and was unable to do so. After further consideration it seems the best way would be to add native X-GM-RAW support to this library!
The specification can be found here https://developers.google.com/gmail/imap/imap-extensions but simply put, we can add a X-GM-RAW attribute to the search query.
I find this necessary to my use case and I believe others may also find it useful. I've added the correct logic and tests.
Thanks!