It would be great to have a server-side implementation of the round-trip optimization outlined in https://xmpp.org/extensions/xep-0410.html#serveroptimization :
> The normal routing rules of the self-ping impose two round-trips: first the initial ping from the client to the MUC, then the reflection of the ping and its response (possibly to another client), and finally the response to the initial IQ. If the other client is experiencing network connectivity issues, which is often the case with mobile devices, the ping request might never be responded to.
> Therefore, a MUC service supporting this protocol may directly respond to a participant's Ping request to the participant's own nickname, as opposed to routing it to any of the participant's clients.
This should be a rather straight-forward thing to add to the MUC code (and a backport to 0.10 will be greatly anticipated).
It would be great to have a server-side implementation of the round-trip optimization outlined in https://xmpp.org/extensions/xep-0410.html#serveroptimization : > The normal routing rules of the self-ping impose two round-trips: first the initial ping from the client to the MUC, then the reflection of the ping and its response (possibly to another client), and finally the response to the initial IQ. If the other client is experiencing network connectivity issues, which is often the case with mobile devices, the ping request might never be responded to. > Therefore, a MUC service supporting this protocol may directly respond to a participant's Ping request to the participant's own nickname, as opposed to routing it to any of the participant's clients. This should be a rather straight-forward thing to add to the MUC code (and a backport to 0.10 will be greatly anticipated).
Added in trunk: https://hg.prosody.im/trunk/rev/7c1cdf5f9f83 Also https://modules.prosody.im/mod_muc_ping.html for 0.10 and older.
ChangesThanks very much for the implementation! Do I have to load mod_muc_ping on the MUC component?
Yes, goes on the component.
Could you please also add the feature string to disco#info which got added into the XEP after you've implemented the code in mod_muc_ping and 0.11, according to https://xmpp.org/extensions/xep-0410.html#serveroptimization <feature var='http://jabber.org/protocol/muc#self-ping-optimization'/> thanks!