SyncKolab 3

Niko Berger niko.berger at corinis.com
Tue Jul 2 11:32:08 CEST 2013



Am 02.07.2013 11:25, schrieb Mihai Badici:
> On Tuesday 02 July 2013 11:03:55 you wrote:
>
>> Hi,
>
>> I added your change as-is (except adding a todo). I might have some
>
>> time this weekend to take a closer look...
>
>>
>
>> @rewrite: Messages are only rewritten if there is a difference 
>> between
>
>> the "locally generated" and the "server side" version. This is the
>
>> reason I need support for all fields (even custom ones), because 
>> without
>
>> these, there is ALWAYS a difference between the version read from 
>> the
>
>> server and the one locally. The basic logic is described on the
>
>> synckolab webpage. Basically I generate a javascript object out of 
>> the
>
>> data from the server and compare it to the cached version locally 
>> (the
>
>> "sync db" is just a bunch of json files which represend the 
>> entries).
>
>>
>
>> Niko
>
> I'm not sure this approach is the best.
>
> I think normaly you could verify if a calendar or contact is "read"
> with the imap mail library. If it is already read, you don't have a
> reason to change it.
>
> As i remember, the "change " must be always a "delete" and "create"
> mail ( aka calendar)
>
> That way, the event could appear as "new" for all other imap clients.
> And at least we don't broke other entries :)

My main problem is how do I detect a "local" change? I do not process a 
mail from imap if it hasnt changed (The changedate is stored locally in 
the sync db), but I keep a version of the parsed entity from the mail. 
This is compared against the entity from thunderbird - and now I see 
that there is a new field (i.e. show-as) -> I cannot know if someone set 
the field so I need to write it to the server.

The only thing I can do is "ignore" certain fields. Unfortunately that 
also means that if someone changes the field - the change is not 
recognized.

I tried multiple approaches, but until now I couldnt find a better way.

In theory all fields should be passed to the server and thus the logic 
works - only if there is a bug in the parsing code this logic doesnt 
work.

Niko




More information about the users mailing list