Skip to content

Incoming messages silently discarded #813

@stigger

Description

@stigger

For quite a long time I've been randomly losing incoming messages, which was very frustrating. Finally, today I was able to figure out what exactly is happening. Turns out that ChatSecure assumes that every stanza id is unique for a given buddy, and discards a message if it has already seen a message with a given id. XMPP, however, does not guarantee that every id is unique:

   The optional 'id' attribute MAY be used by a sending entity for
   internal tracking of stanzas that it sends and receives (especially
   for tracking the request-response interaction inherent in the
   semantics of IQ stanzas).  It is OPTIONAL for the value of the 'id'
   attribute to be unique globally, within a domain, or within a stream.

There are clients (e.g. @psi-im) that use sequential ids for stanzas. So, whenever such client is restarted, ChatSecure is not going to see any messages from it until the id exceeds the last seen.

I don't know what problem the id-based check for duplicates was meant to solve, but it seems that it breaks the standard and needs to be removed as soon as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions