On 22 Jan 2015, at 11:16, Daniel Gultsch <dan...@gultsch.de> wrote:
> 
> Hi Kevin,
> 
> 2015-01-22 10:46 GMT+01:00 Kevin Smith <kevin.sm...@isode.com>:
>   Older versions of the XEP had the server inject MAM UIDs (not to be 
> confused with message stanza IDs, which they are not) into incoming stanzas 
> in an effort to allow clients complete local copies of their archive without 
> ever receiving a message twice. However, this didn’t work; there were edges 
> (particularly around messages passing each other on the wire) where the 
> client would end up with an incomplete copy of the archive. The current 
> version of the spec doesn’t have it. If you want to do a full sync, you will 
> indeed receive incoming messages addressed to your own client twice - once 
> when you receive them via normal routing, and once when you next synchronise 
> with the MAM archive.
> 
> I don't care too much about actually receiving the message twice (I would 
> still query the entire archive since the last time I have been online) I just 
> want to be able deduplicate messages in my own local history.

That bit’s straightforward - you’ll never get duplicates from MAM (unless you 
were sent duplicates, naturally) if you don’t ask for them. Just request the 
MAM history since the latest UID you got last time you synced: 
http://xmpp.org/extensions/xep-0313.html#query-paging

/K

Reply via email to