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

Enable inital synching #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

marlemion
Copy link

I had difficulties to get syncing running with graph. Usually, with python-kopano, one would fetch folder.state and sync, thereby fetching another state. These states could be compared and respective actions could be performed.

In graph, there is no folder.state. The mailFolder Ressource simply does not know it. Therefore, the folder.state needs to be retrieved somewhere from. In the initial code, I hade to do a sync with a certain time (i.e. datetime.datetime.now()) to retrieve the latest state. However, when using this state as a deltatoken to ask for an update, something does not work. Apparently, the state is wrong. Kopano seems to hang. Hence, I modified the code to allow for returning an initial deltatoken for the first messages/delta (i.e. without any token). Thus, in analogy to the python-kopano way, one would do a messages/delta first retrieving a token and then provide that token to the next delta request.

I don't know whether this is the intended way of MS Graph, i.e. whether a simple messages/delta returns the current state of the folder or the oldest state of the folder. The modified code returns the current state.

I had difficulties to get syncing running with graph. Usually, with python-kopano, one would fetch folder.state and sync, thereby fetching another state. These states could be compared and respective actions could be performed.

In graph, there is no folder.state. The mailFolder Ressource simply does not know it. Therefore, the folder.state needs to be retrieved somewhere from. In the initial code, I hade to do a sync with a certain time (i.e. datetime.datetime.now()) to retrieve the latest state. However, when using this state as a deltatoken to ask for an update, something does not work. Apparently, the state is wrong. Kopano seems to hang. Hence, I modified the code to allow for returning an initial deltatoken for the first messages/delta (i.e. without any token). Thus, in analogy to the python-kopano way, one would do a messages/delta first retrieving a token and then provide that token to the next delta request.

I don't know whether this is the intended way of MS Graph, i.e. whether a simple messages/delta returns the current state of the folder or the oldest state of the folder. The modified code returns the current state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant