Skip to content
Back to top
View this page

# XEP-0463: MUC Affiliation Versioning

XEP-0463 on xmpp.org

class slixmpp.plugins.xep_0463.XEP_0463(xmpp, config=None)

  XEP-0463: MUC Affiliation Versioning

  This plugin does only one thing: it registers the stanza plugins.

  stanza = <module 'slixmpp.plugins.xep_0463.stanza' from '/build/slixmpp-QRhfpR/slixmpp-1.17.0/slixmpp/plugins/xep_0463/stanza.py'>

## Stanza elements

Usage:

    >>> register_plugin(for_doctests=True)  # automatically done when enabling the XEP_0463 plugin
    >>> presence = Presence()
    >>> presence["muc_join"]["mav"]["since"] = "opaque-ver"
    >>> presence.pretty_print()
    <presence xmlns="jabber:client">
      <x xmlns="http://jabber.org/protocol/muc">
        <mav xmlns="urn:xmpp:muc:affiliations:1" since="opaque-ver" />
      </x>
    </presence>

    >>> msg = Message()
    >>> msg["muc"]["mav"]["since"] = "since-ver"
    >>> msg["muc"]["mav"]["until"] = "until-ver"
    >>> msg.pretty_print()
    <message xmlns="jabber:client">
      <x xmlns="http://jabber.org/protocol/muc#user">
        <mav xmlns="urn:xmpp:muc:affiliations:1" since="since-ver" until="until-ver" />
      </x>
    </message>

    >>> presence = Presence()
    >>> presence["muc"]["mav"]["until"] = "XXX"
    >>> presence.pretty_print()
    <presence xmlns="jabber:client">
      <x xmlns="http://jabber.org/protocol/muc#user">
        <mav xmlns="urn:xmpp:muc:affiliations:1" until="XXX" />
      </x>
    </presence>

class slixmpp.plugins.xep_0463.stanza.Mav(xml=None, parent=None)
  interfaces: ClassVar[set[str]] = {'since', 'until'}

    The set of keys that the stanza provides for accessing and manipulating the underlying XML object. This set may be augmented with the `plugin_attrib` value of any registered stanza plugins.

  name: ClassVar[str] = 'mav'

    The XML tag name of the element, not including any namespace prefixes. For example, an `ElementBase` object for `<message />` would use `name = 'message'`.

  namespace: str = 'urn:xmpp:muc:affiliations:1'

    The XML namespace for the element. Given `<foo xmlns="bar" />`, then `namespace = "bar"` should be used. The default namespace is `jabber:client` since this is being used in an XMPP library.

  plugin_attrib: ClassVar[str] = 'mav'

    For `ElementBase` subclasses which are intended to be used as plugins, the `plugin_attrib` value defines the plugin name. Plugins may be accessed by using the `plugin_attrib` value as the interface. An example using `plugin_attrib = 'foo'`:

        register_stanza_plugin(Message, FooPlugin)
        msg = Message()
        msg['foo']['an_interface_from_the_foo_plugin']

slixmpp.plugins.xep_0463.stanza.register_plugin(for_doctests=False)
  Return type:

    `None`