Someone pinged me via IM about XEP-0012 and last unavailable presence, but promptly disappeared so I was not able to reply to him. Since perhaps his confusion is common, I figured I would post his message here:
*** Displaying status messages of offline contacts is very, very useful. At start, client sends only a presence=available information to server and then server sends it to all contacts in roster. But I think server should also send a jabber:iq:last request - without this functionality client has 2 options - either to send jabber:iq:last requests to all contacts in roster manually (but it's simply flooding the server!) or not to do it at all (causing people unable to see status messages of offline contacts at all, which is not very nice). ejabberd uses this XEP, so a problem is very common *** This reflects a misunderstanding of core XMPP functionality. In particular see this text in rfc3921bis: 4.3.2. Server Processing of Inbound Presence Probe Upon receiving a presence probe from the user's server on behalf of the user, the contact's server SHOULD reply as follows: <snip/> 2. Else, if the contact has no available resources, the server MUST either (1) reply to the presence probe by sending to the user the full XML of the last presence stanza of type "unavailable" received by the server from the contact, or (2) not reply at all. So a nice server will return the last unavailable presence information (with a Delayed Delivery flag), thus obviating the need for a flood of jabber:iq:last requests. Peter -- Peter Saint-Andre https://stpeter.im/
smime.p7s
Description: S/MIME Cryptographic Signature