- BOSH and WebSocket transports are now based on Duplex streams.
- Stream management state caching may now by async.
- Expanded the set of events related to stream management. See Using Stream Management. These events are:
stanza:hibernatedmessage:hibernatedmessage:ackedmessage:failedmessage:retry
- The default external service discovery namespace was changed to
urn:xmpp:extdisco:2. Querying using the:1namespace can be done withclient.discoverICEServers({ version: '1' }).
WARNING: Unlike many previous major version bumps that were almost entirely backwards compatible, v12 is not backwards compatible. Upgrading to v12 will require modifications in existing code.
-
Complete TypeScript support
-
Changed JXT implementation (old JXT definitions will not work). See JXT docs for more information.
-
Changed structure/names of JXT definitions for supported XEPs. See Supported XEP Formats for links to the type definitions of each XEP supported by StanzaJS.
-
Removed support for callbacks. All methods now support Promises only.
-
Methods using IQ stanzas now return the requested data instead of the full IQ stanza data.
-
Changed SASL implementation. Old, custom SASL mechanisms will not work.
-
Removed JID objects. JIDs are now treated as strings only. See src/JID.ts for helper functions.
-
Implemented Stringprep (not PRECIS, yet).
-
Removed WildEmitter. Now using standard EventEmitter. Event handlers using
*wildcards will need to be changed.- The
*andraw:*events are still supported.
- The
-
Added input/display helpers for Realtime Text.
-
Configuration of transports has changed. The wsURL/boshURL/transport fields are no longer used. Configuring transports is now done by setting the
transportsfield to an object:XMPP.createClient({ transports: { websocket: 'wss://...', bosh: 'https://...' } })Using
falseinstead of a URL will disable that transport type. An object can be used to pass additional configuration, such as BOSH pre-binding rid/sid:XMPP.createClient({ transports: { websocket: false, bosh: { url: 'https://...', rid: 1234, sid: '...' } } })
- Jingle sessions now queue local actions to allow safer handling of WebRTC peer connection objects.
- Changed package name from
stanza.iotostanza. - The new website URL is https://stanzajs.org
- Renamed
muc:affiliationevent tomuc:other
- Converted to ES modules, using Typescript compiler for downleveling.
- Moved stanza definitions back from
jxt-xmpp, obsoleting bothjxt-xmppandjxt-xmpp-types. - Replaced use of
requestandxhrwithcross-fetch. - SASL mech implementations now live inside
stanza.io. - Moved host-meta fetching logic into
stanza.io. - Moved
xmpp-jidimplementation back intostanza.io, obsoletingxmpp-jid. - Use
wsmodule instead offaye-websocket. - Dropped support of old, pre-RFC XMPP-over-WebSocket.
- Moved
jingleimplementation back intostanza.io.
- Fixed CSI namespace to use
urn:xmpp:csi:0 - Added support for XEP-0333 Chat Markers
-
Breaking Changes
-
Removed
client.call()See the jingle-interop-demos for how to recreate the behaviour by working directly with the jingle.js and localmedia libraries.
var localMedia = require('localmedia'); localMedia.start(); //... var sess = client.jingle.createMediaSession(peerJID); sess.addStream(localMedia.localStream); sess.start();
-
client.jinglewas updated to ajingle.js v1.0instance.The method
client.jingle.startLocalMedia()has been removed, in favor of using the localmedia module instead (which is not bundled instanza.io).
-