[Standards] When is it ok to query for CSN support?

Kevin Smith kevin at kismith.co.uk
Wed Jul 24 12:14:39 UTC 2013


On Wed, Jul 24, 2013 at 11:26 AM, Adán Sánchez de Pedro Crespo
<adansdpc at waalt.com> wrote:
> Hello everyone,

Hi,

> I hope this is the proper mailing list for asking about standards
> implementation. If not, please tell me where to reach instead.

This is good.

> I'm currently developing Loqui, a open source XMPP client app for FirefoxOS
> and the web. It formerly supported Chat State Notifications, but determined
> support by using the "business rules" in XEP-0085 5.1
>
> Nevertheless, the XEP stands that the preferred way to determine support for
> CSN is by using 'Service Discovery' or 'Entity Capabilities' extensions.
>
> So my question is:
> When is it ok to perform that disco/caps queries? Should I query everyone in
> my roster upon logged in?

Absolutely not! Have a look at XEP-0115, which obviates the need for this.

> Or should I query just one user once I open a chat
> window? How long may I cache the result of the query?

XEP-0115 sorts this out for you as well (for contacts in your roster
or for which you otherwise have presence).

> What's more: though not said in XEP-0085, I think CSN support is clearly
> resource-based. Should I query every available resource from a user and then
> obey the one with the highest priority value?

For the initial message to the bare JID it's probably best not to send
CSN anyway. After you've bound the chat to a full JID you know which
resource you need to worry about the caps for.

/K



More information about the Standards mailing list