yaxim-org / yaxim

yaxim - a lean XMPP/Jabber client for Android
https://yaxim.org
GNU General Public License v3.0
486 stars 238 forks source link

Message delivery error in carbon not shown #264

Closed Zash closed 4 years ago

Zash commented 4 years ago

To reproduce:

  1. Open a chat with a contact on a server that is currently unavailable in Yaxim
  2. Send a message to this contact from another device, observe that this shows up in Yaxim
  3. Wait for local server to give up trying to connect and send error replies.
  4. Observe lack of error message in Yaxim.

Tested in Yaxim 0.9.9-7-g7288f07 2020-03-29 from yax.im/apk

The message, wrapped in Carbons, looks like this:

<message type="error" from="you@localhost" to="you@localhost/yaxim.CF93DE69">
  <received xmlns="urn:xmpp:carbons:2">
    <forwarded xmlns="urn:xmpp:forward:0">
      <message xmlns="jabber:client" to="you@localhost/otherclient" from="contact@unavailable.invalid" type="error">
        <error by="localhost" type="cancel">
          <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
          <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Server-to-server connection failed: No route to host</text>
        </error>
        <stanza-id xmlns="urn:xmpp:sid:0" id="yaIRCS1-pzHbhM7k" by="you@localhost"/>
      </message>
    </forwarded>
  </received>
</message>
ge0rg commented 4 years ago

yaxim requires that the original message and the error response have an id attribute so that error matching will work.

Zash commented 4 years ago

And I just checked that it does work if proper id attributes are used. From both MAM and Carbons..