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

Filters by date #61

Open
smallbitt opened this issue Feb 10, 2017 · 6 comments
Open

Filters by date #61

smallbitt opened this issue Feb 10, 2017 · 6 comments
Labels

Comments

@smallbitt
Copy link

smallbitt commented Feb 10, 2017

Within the getMessageList request I'm trying this pattern:
filter: {
inMailboxes: [5],
after: [lastMsgDate]
}

but I get an error.
isn't "after" parameter supported yet?
if No, how can I retreive only new records without download whole list and checkdates with a loop?

@smallbitt smallbitt changed the title Filters about date Filters by date Feb 10, 2017
@ddolcimascolo
Copy link
Contributor

Hello,

Thanks for your interest in jmap-client !

First question I need to ask is: what is your JMAP backend? As you may know, JMAP is a fairly new protocol that very few email backends implement, and when they do they do so on a subset of the specification. The most advanced implementation as of writing is Apache James, a Java mail server from the Apache foundation that is maintained by Linagora.
In James, requesting a message list with a after or before filter is fully supported, but it is not in other implementation that I'm aware of.

Other things you may check include:

  • The format of the Date you're sending for the after filter. Dates must follow a specific format in JMAP.
  • The format of the filter itself, especially if you mix operators (AND, OR, etc.) and conditions.
  • The error returned, which should tell you what the problem is (invalid properties requested, invalid filter, non existent mailbox, etc.)

I hope this helps, and I'm looking forward to hear back from you on this.

David

@ddolcimascolo
Copy link
Contributor

Hello,

Unfortunately no, getMessageListUpdates and other related getXXXUpdates are not implemented yet, and the states mechanism isn't either. On the other hand, I don't think you can find a JMAP backend implementing this already...

If you want to help, we'll welcome your contribution :)

Regards,

I was wondering if getMessageListUpdates is implemented, it would help alot fetching only new messages.

@smallbitt
Copy link
Author

smallbitt commented Feb 20, 2017 via email

@ddolcimascolo
Copy link
Contributor

Excellent !
I hope you'll contribute this code :)

@smallbitt
Copy link
Author

smallbitt commented Feb 20, 2017 via email

@ddolcimascolo
Copy link
Contributor

Hey @smallbitt,

Do you need help for your contribution?
Feel free to ask :)

Regards,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants