In recent Emacs versions, `labels' only provides lexical binding if the
variable lexical-binding is set to t. Avoid the problem by assigning
the functions to simple variables and passing them to jabber-send-iq.
Session establishment was removed in RFCs 6120 and 6121. Some servers
still offer it for backwards compatibility, but some don't. Let's be
compatible with the latter.
New variable `jabber-history-inhibit-received-message-functions'
can contain a list of functions. If any of them returns non-nil, the
given incoming message is not included in the message history.
If an incoming IQ had no 'from' attribute, and we would try to send an
error response to it, then the response actually sent would have
to='nil', as jabber-sexp2xml converts the 'nil' symbol to an attribute
value, but the XML console would fail to display the response. Avoid
this by omitting the 'to' attribute in this case.
If the incoming IQ had no 'id' attribute, the same would happen: the
response sent on the wire would have id='nil', and the console would
fail to print it. Section 8.3.1 of RFC 6120 says that the id attribute
of the response should be empty if the id attribute in the request was
absent, so let's do that here.
Presence stanzas that concern us have status code 110. This is
particularly important to notice when the server changes our nick for
us (status code 210).
Give all chat prompts a 'field property. This changes behaviour,
hopefully to the better. For example, C-a will now stop at the
beginning of the chat text; use C-b C-a at that point to go to the
beginning of the prompt.
Use the field property to improve jabber-chat-goto-address. Previously,
we would try to make URLs clickable in the entire buffer, which besides
being wasteful would cease working once the buffer size was past
goto-address-fontify-maximum-size.
This improves interoperability with the client Profanity.
Comparing what Pidgin sends to what jabber.el did, the
difference was that Pidgin includes an id- and a type attribute.
Adding just the 'type' was enough to make Profanity recognize
the notifications sent by jabber.el.
Previously we would crash in destructuring-bind, but this produces
rather unhelpful error messages. Better log it in *fsm-debug*, pointing
to the source of the error.
The closure data used in jabber-process-caps-modern was a three-element
list, while the one used in jabber-caps-try-next was a cons cell. This
led to crashes in jabber-process-caps-info-error when there were more
than one contact with the same caps hash, all failing to respond.
Some SASL mechanisms, e.g. SCRAM-SHA-1, specify that the server should
send additional data along with the success response. This data needs
to be validated by the client according to the SASL mechanism.
This was overlooked when introducing namespace handling: the namespace
prefix is no longer part of the element name, and the namespace can be
looked up through a fictitious xmlns attribute.
In jabber-network-connect-async, the call to make-network-process can
fail in certain cases without creating a connection and without
calling our sentinel function, in particular if DNS resolution fails,
and that error case was not updated for the new error reporting
solution. This should now work properly.