1.0.0-beta • Published 1 year ago

@pazznetwork/xmpp-adapter v1.0.0-beta

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

XMPP

General

Xmpp stands for "Extensible Messaging and Presence Protocol" and was called in the past Jabber, that is the reason why there are so many references to jabber instead of xmpp.

Xmpp connects over BOSH (Bidirectional-streams Over Synchronous HTTP) which means that 2 HTTP connection will be kept open which sends stanzas (XML payloads) to the server in the first and gets them in the second one. Xmpp can now be implemented with Websocket except secure reconnections, discovery and other specific technical expectations.

General Technical Design Guidelines

In general the xmpp design choices can be better understood if you imagine trying to make a chat out of email. Therefore, there a specifications for the case of multi-user clients on a device, multi device users, multi device users on multiple servers which all support or can support different sets of features while also the same client can offer the user multiple different sets of features to support.

The goal of the authentication as well the communication line encryption tries always to be as simple and secure as possible as-well as supporting all versions and iterations of the specifications dedicated to it.

As the clients struggled with a high amount of complexity for many users the complexity was pushed slowly back to the specifications also different specifications sets. Modern clients should orient themselves on the compliance for the XMPP IM (instant messaging) client and look for the extended protocols. See: https://xmpp.org/extensions/xep-0443.html#im and https://xmpp.org/extensions/xep-0369.html the MIX specification making it possible to skip the previous implementations.

TODO MORE:

Contact Management

Every user can write to any other user as long they know or have their jid, guessed of from a shared room. A user can be blocked or added to your contacts. An add to the contacts is a subscription to as users presence which will be broadcast by him when he logs in. When a user added you to your contacts you can also add them which creates a bidirectional subscriptions.

The add, remove and block are managed by the rooster spec and block spec which manage contact and block lists of a user.

There is always the case of the user writing without sending a contact request which leads to the need to also analyse the received messages by the user to visualize all contacts.

Messaging

In the core specification messages arrive to a user only when he is online and only to the specific client and specific device and are only kept in one session. For managing offline messages and the message history the Message Archive Management shorted to MAM was added.

When a server supports this feature

Other Message Features other Chat Clients offer and are in specification process:

  • Time

Connection Management

To establish a stable connection the implementation of the ping specification is necessary to avoid timeouts if there are no actions performed on the connections. To have proper timeouts on requests there is the need for the ack specifications which checks regular if a set amount of requests was answered and makes a reconnections possible on the last set of packages.

Specifications

XMPP Core RFC-6121

XMPP Extension for Websocket RFC-7395

Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence

Abstract Specification extending or amending existing ones

XMPP Forms, XHTML, X-Forms

XEP-0004 Used in publish-subscribe, message-archive or multi-user-chat.

Extended Stanza Addressing

XEP-0033 Used to send one message to several JIDs at the same time and to forward messages.

Plugins

service-discovery

XEP-0030

XEPVersionStatusNamePluginsNotes
XEP-00451.31.2PartialMulti-user chat roomsmulti-user-chatAll basics stuff is supported. Also, some more advanced features like invitations, creation of rooms, etc.
XEP-00481.1PartialBookmarksbookmark
XEP-00491.2DiscussPrivate XML StorageFor bookmark storage and meta contacts.
XEP-00501.2DiscussAd-Hoc Commands
XEP-00541.2DiscussVCard-temp
XEP-00551.3DiscussJabber Search
XEP-00591.0PartialResult Set Managementmessage-archiveUsed by XEP-0313.
XEP-00601.13PartialPublish-Subscribepublish-subscribe
XEP-00651.8DiscussSOCKS5 Bytestreams
XEP-00661.5PlannedOut of Band DataSupport for URLs in messages.
XEP-00701.0DiscussVerifying HTTP Requests via XMPP
XEP-00711.4DiscussXHTML-IM
XEP-00772.4PartialIn-band registrationregistration
XEP-00831.0DiscussNested Roster Groups
XEP-00841.1.1DiscussUser Avatar
XEP-00852.1DiscussChat State Notifications
XEP-00951.1DiscussStream Initiation
XEP-01071.2DiscussUser Mood
XEP-01081.3DiscussUser Activity
XEP-01151.5PartialEntity Capabilitiesroster
XEP-01181.2DiscussUser Tune
XEP-01441.1.1DiscussRoster Item ExchangeMakes sharing of roster contacts possible
XEP-01451.0DiscussAnnotationsNotes for contacts
XEP-01461.0DiscussRemote Controlling Clients
XEP-01531.0DiscussvCard-Based Avatars
XEP-01571.1.0DiscussContact Addresses for XMPP Services
XEP-01581.0DiscussCAPTCHA FormsImages only.
XEP-01631.2PartialPersonal Eventing Protocolpublish-subscribe, message-archive
XEP-01661.1.2DiscussJingle
XEP-01721.0DiscussUser Nickname
XEP-01841.2DiscussMessage ReceiptMessage was read notification
XEP-01911.3PartialBlocking CommandblockImplemented instead of XEP-0016
XEP-01981.6PartialStream Managementforeign:xmpp/stream-managementAutomatically responds to acks but does not support requesting acks yet.
XEP-01992.0PartialXMPP Pingping
XEP-02000.2DiscussStanza Encryption
XEP-02022.0PartialEntity Timeentity-time
XEP-02032.0DiscussDelayed Delivery
XEP-02090.1DiscussMetacontacts
XEP-02211.0DiscussData Forms Media Element
XEP-02221.0DiscussPersistent Storage of Public Data via PubSub
XEP-02231.1DiscussPersistent Storage of Private Data via PubSub
XEP-02241.0DiscussAttention
XEP-02311.0DiscussBits of Binary
XEP-02340.17.1DiscussJingle File Transfer
XEP-02371.2DiscussRoster Versioning
XEP-02451.0DiscussThe /me Command
XEP-02491.2DiscussDirect MUC Invitations
XEP-02581.1.1DiscussSecurity Labels in XMPP
XEP-02601.0.3DiscussJingle SOCKS5 Bytestreams Transport Method
XEP-02611.0DiscussJingle In-Band Bytestreams Transport Method
XEP-02800.12.0PartialMessage Carbonsmessage-carbonsWithout implementing §6.1
XEP-02840.1.3DiscussShared XML Editing
XEP-02920.11DiscussvCard4 Over XMPP
XEP-02970.3PartialStanza Forwardingmessage-carbonsSupported only for XEP-0313/xep-0280.
XEP-03001.0.0DiscussUse of Cryptographic Hash Functions in XMPP
XEP-03060.2.1DiscussExtensible Status Conditions for Multi-User Chat
XEP-03081.0DiscussLast Message Correction
XEP-03130.6.3PartialMessage Archive Managementmessage-archiveMakes message history for users
XEP-03160.1DiscussMUC Eventing protocol
XEP-03170.1DiscussHats
XEP-03191.0.2DiscussLast User Interaction in Presence
XEP-03330.4DiscussChat Markers
XEP-03340.3.0DiscussMessage Processing Hints
XEP-03521.0.0DiscussClient State Indication
XEP-03570.4.1PartialPush Notificationspush
XEP-03590.6.1PartialUnique and Stable Stanza IDsmessage-uid
XEP-03631.0.0PartialHTTP File Uploadhttp-file-upload
XEP-03681.1.0PartialSRV records for XMPP over TLSforeign:xmpp/resolve
XEP-03720.5.0DiscussReferences
XEP-03730.4.0DiscussOpenPGP plugin.
XEP-03770.3DiscussSpam Reporting
XEP-03800.3.0DiscussExplicit Message Encryption
XEP-03820.2.0DiscussSpoiler messages
XEP-03840.7.0DiscussOMEMO Encryption
XEP-03920.7.0DiscussConsistent Color Generation
XEP-03931.1.1DiscussMessage Styling
XEP-03980.2.1DiscussUser Avatar to vCard-Based Avatars Conversion
XEP-04111.0.0DiscussBookmarks Conversion
XEP-04220.2.0DiscussMessage Fastening
XEP-04240.3.0DiscussMessage Retractions
XEP-04250.2.1DiscussMessage Moderation
XEP-04370.2.0DiscussRoom Activity Indicators
XEP-04410.2.0DiscussMessage Archive Management Preferences
XEP-04530.1.0DiscussDOAP usage in XMPP
XEP-04530.1.0DiscussOMEMO Media sharing

plugin overview

PluginsCore XEPRelevant XEPsFunctionNotes
blockXEP-0191Blocking contact
bookmarkXEP-0048Storing Stanzas for later actions
entity-timeXEP-0202Message Timestamps
http-file-uploadXEP-0363File upload
messageRFC 6120Messaging Core
message-archiveXEP-0313XEP-0004, XEP-0059, XEP-0163Message History
message-carbonsXEP-0280XEP-0297Message Multidevice Sync
message-stateCUSTOMXEP-0184Custom Message Read
message-uuidXEP-0359Unique
muc-subEjabberdChat Room Notifications
multi-user-chatXEP-0045XEP-0004Chat Rooms
pingXEP-0199Checks connections
publish-subscribeXEP-0060XEP-0004, XEP-0163Publish und Subscribe between Nodes with IQ
pushXEP-0357Inform about message when offline
registrationXEP-0077Registration without Admin
rosterXEP-0115List of contacts
service-discoveryXEP-0030XEP-0163Check for provided Services (XEP's) by server
unread-message-countCUSTOMCount unread messages
1.0.0-beta

1 year ago