Ask / Submit

[feature-request] Implement XEP-0198 (Stream Management) for XMPP

asked 2014-01-16 20:59:50 +0200

seiichiro0185 gravatar image

updated 2014-11-09 17:59:55 +0200

nthn gravatar image

XMPP doesn't by default acknowledge received messages, which can lead to lost messages when on an unstable Network connection (like mobile data on the move). XEP-0198 describes the official XMPP Extension for implementing a way to acknowledge received messages and resume connections after Network access is restored, so no messages are lost.

According to my tests XMPP on Jolla doesn't support this at the moment, so there is a high probability of lost messages when using jabber on unreliable connections.

The official definition is here:

edit retag flag offensive close delete



I would like to see this implemented too. It's a must for mobile devices.

clau ( 2014-01-16 21:28:10 +0200 )edit

This would be very useful but at present it would be to require a lot of time and effort to implement as per below from jbrooks. Richard

richardski ( 2014-01-17 10:03:46 +0200 )edit

I'm offering 0.2 BTC for this on FreedomSponsors, so feel free to add to the fund:

ryukafalz ( 2014-02-07 18:35:47 +0200 )edit

It's stupid and wreckless to implement XMPP on a mobile device without XEP-0198. Basically, the jolla device can connect to IM, but is very likely to constantly lose messages. How this was approved amazes me!

WhyNotHugo ( 2014-07-23 09:27:44 +0200 )edit

hobarerra: The underlying system they chose to use doesn't support it at this time, and Jolla used it without really modifying Gabble/Wocky. While it's true that Jolla does have more of an interest in this than other Telepathy client devs might due to the fact that they have a mobile client, they've explained (see jbrooks's response below) that they don't have enough people currently to implement this.

This is, at present, an upstream issue. As much as I want to see it happen (as with a number of other Telepathy enhancements for mobile clients) there just isn't anyone with the time, expertise, and motivation to work on it at the moment.

(I'm trying to learn myself, but I have a full time job as well and no C experience. Moving slowly. My lack of experience, by the way, is why I'm putting some money towards it as a bounty - I know I don't have the skills yet to do it, but I really hope to see it happen.)

ryukafalz ( 2014-07-23 21:53:23 +0200 )edit

4 Answers

Sort by » oldest newest most voted

answered 2014-01-17 06:19:18 +0200

jbrooks gravatar image

For XEP-0198 specifically, we'll first need support in Telepathy. There's an upstream bug about this at, unfortunately without any recent activity. Patches welcome? ;)

In general, we don't do much to handle message states for IM right now. There are some improvements that could be made even without proper message acknowledgement to, at least, catch more cases where sending fails. It gets tricky, since every server is inconsistent about behavior. We should at least be consistent about detecting whether a message has been sent to the network or not.

Facebook Chat does actually have a method for delivery reports: they echo every message you send back to you, sometimes twice, without any unique identifier other than the message text. We actually had to ignore those messages to avoid spamming the conversation, but if we matched them by the message text (ugh.), they could be used as a primitive form of delivery report. Until they're broken on the server-side, of course..

edit flag offensive delete publish link more



I thought the problem has to be solved inside telepathy, problem is that a lot of enhancement requests are just ignored by telepathy upstream (e.g. otr or zrtp support have the same problem). Maybe jolla could do something in this regard since telepathy is an integral part for messaging on sailfish?

seiichiro0185 ( 2014-01-17 10:05:39 +0200 )edit

We don't have enough people available for it, unfortunately. In the long term, it might be possible, but for now we have to wait on upstream.

I do intend to investigate some of the cases I mentioned above regarding sending failure, and try to improve it however I can, when time permits.

jbrooks ( 2014-01-17 21:17:23 +0200 )edit

Telepathy, however, supports XEP-0184 "Message Delivery Receipts".

This is a client side acknoledgement sent by the receiver's client. On Android, for example, this XEP is implemented (among others) in the popular "Xabber" IM client.

Actually, the Jolla XMPP client already sends these acknoledgements; this means when a Jolla user chats with an Xabber user, the Xabber user gets little check marks for the messages recieved by the Jolla user.

But the Jolla user, on the other hand, doesn't get any visible indication.

So, maybe there is only some "UI glue" is missing to display a little check mark (✔), as well.

Mario ( 2014-06-27 23:16:08 +0200 )edit

Hard as it is, without XEP-0198, sailfish will lose messages. It's inevitable on mobile networks, and having a chat client that loses data is wreckless. Until this is fixed, sailfish's IM can't be considered safe or trustworthy; it's actually a huge security hole, since it can lead to considerable data loss.

WhyNotHugo ( 2014-07-23 09:29:57 +0200 )edit

It seems that support for at least part of XEP-0198 is being implemented in telepathy, see comments here. How long might it take for it to get included in a Sailfish release? I have noticed chat messages are actually being dropped, for instance when the receiver leaves a wifi location, so this improvement is needed badly.

Arie ( 2014-11-04 14:47:34 +0200 )edit

answered 2015-11-20 16:31:00 +0200

noonien gravatar image

Finally ported the patch to sailfish:

edit flag offensive delete publish link more



awesome, thank you! (I wish upstream wasn't so weird...)

tad ( 2015-11-21 02:27:05 +0200 )edit

I took your changes merged them with the latest upstream changes see here

Thaodan ( 2016-07-12 15:48:08 +0200 )edit

Well done, but how does it affect SailfishOS? Will SFOS dev crew merge it, too?

Nekron ( 2016-07-13 13:07:32 +0200 )edit

answered 2016-01-12 22:01:22 +0200

nthn gravatar image

AT LAST something seems to be going on upstream! Hopefully everything is okay and it gets accepted soon, after that it should not be long until Jolla have it available in their repositories - i.e. until it becomes a part of Sailfish.

edit flag offensive delete publish link more

answered 2015-01-02 17:33:04 +0200

Thaodan gravatar image

updated 2016-07-12 15:53:25 +0200

Any updates on this?

EDIT: there an update about this (; A branch an on github includes the extention for telepathy-gabble now:

EDIT2: I merged the patches that implement XEP-0198 and merged the latest upstream changes back. The package is in my repo here (url on mer buildservice). The source modifed sources are here

edit flag offensive delete publish link more


We need a third party IM client, the Sailfish team probably doesn't have competencies with XMPP and Telepathy

DeepPurple15x ( 2015-06-09 08:19:52 +0200 )edit
2 don't seem to get telepathy.

Thaodan ( 2015-06-09 16:10:31 +0200 )edit

@Thaodan great, thanks for your effort

tad ( 2016-07-13 16:22:14 +0200 )edit

So basically you need to do two things:

  • enable your XMPP server to support XEP-0198
  • install the new telepathy-gabble RPM from @Thaodan on your phone

Stream management should be tured on automagically with this patched release so loosing messages while chatting in the train will no longer happen.

Nekron ( 2016-07-14 14:53:56 +0200 )edit
Login/Signup to Answer

Question tools



Asked: 2014-01-16 20:59:50 +0200

Seen: 2,814 times

Last updated: Jul 12 '16