XEP-0106: Gateway interaction#

class slixmpp.plugins.xep_0100.XEP_0100(xmpp, config=None)[source]#

XEP-0100: Gateway interaction

Does not cover the deprecated Agent Information and ‘jabber:iq:gateway’ protocols

Events registered by this plugin:

  • legacy_login: Jabber user got online or just registered

  • legacy_logout: Jabber user got offline or just unregistered

  • legacy_presence_unavailable: Jabber user sent an unavailable presence to a legacy contact

  • gateway_message: Jabber user sent a direct message to the gateway component

  • legacy_message: Jabber user sent a message to the legacy network

Plugin Parameters:

  • component_name: (str) Name of the entity

  • type: (str) Type of the gateway identity. Should be the name of the legacy service

  • needs_registration: (bool) If set to True, messages received from unregistered users will not be transmitted to the legacy service

API:

  • legacy_contact_add(jid, node, ifrom: JID, args: JID): Add contact on the legacy service. Should raise LegacyError if anything goes wrong in the process. ifrom is the gateway user’s JID and args is the legacy contact’s JID.

  • legacy_contact_remove(jid, node, ifrom: JID, args: JID): Remove a contact.

transform_legacy_message(jabber_user_jid, legacy_contact_id, body, mtype=None)[source]#

Transform a legacy message to an XMPP message