Skip to content

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