On 22 Jan 2015, at 00:11, Daniel Gultsch <dan...@gultsch.de> wrote:
> right now a client when querying the MAM archive has to relay upon the fact 
> that server time and client time are the same (which they never are) or that 
> all received messages have a proper message id (which they never do). If both 
> these mechanism fail the client has no chance of avoiding duplicate messages.
> 
> 
> One possible solution would be for MAM to tag live incoming messages with the 
> ID that identifies that message in the archive (The id that is used in the 
> result tag)
> 
> That way a client can, when querying the archive later, filter out messages 
> that have been received before.
> 
> I somehow got under the impression that earlier versions of the MAM XEP 
> already did that but failed to find anything in the XEP archive about that. 
> If that has been the case is there a reason that feature has been removed?

Hi Daniel,
 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.

If someone comes up with a non-broken solution for avoiding this, standardising 
it is always an option.

/K

Reply via email to