Skip to content
Back to top
View this page

# XEP-0045: Multi-User Chat

XEP-0045 on xmpp.org

class slixmpp.plugins.xep_0045.XEP_0045(xmpp, config=None)

  XEP-0045 Multi-User Chat.

  This XEP is made for use by clients or components acting as clients. If a component is made to act as MUC service, it should only care about the events and the stanza plugins.

  A single component may want to simulate joins as multiple entities, in which case it should enable the multi_from config option.

  async cancel_config(room, *, ifrom=None, **iqkwargs)

    Cancel a requested config form.

    Parameters:

      room (`str` | `JID`) – Room to cancel the form for.

  decline(room, jid, reason='', *, mfrom=None)

    Decline a mediated invitation.

    Parameters:

      - room (`str` | `JID`) – Room the invitation came from.

      - jid (`str` | `JID`) – JID of the user who sent the invitation.

      - reason (`str`) – Reason for declining.

  default_config: ClassVar[dict[str, Any]] = {'multi_from': False}

    The basic, standard configuration for the plugin, which may be overridden when initializing the plugin. The configuration fields included here may be accessed directly as attributes of the plugin. For example, including the configuration field ‘foo’ would mean accessing plugin.foo returns the current value of plugin.config[‘foo’].

  async destroy(room, reason='', altroom=None, *, ifrom=None, **iqkwargs)

    Destroy a room.

    Parameters:

      - room (`str` | `JID`) – Room JID to destroy.

      - reason (`str`) – Reason for destroying the room.

      - altroom (`str` | `JID` | `None`) – An alternate room that users should join.

  async get_affiliation_list(room, affiliation, *, ifrom=None, **iqkwargs)

    Get a list of JIDs with the specified affiliation

    Parameters:

      - room (`str` | `JID`) – Room to get affiliations from.

      - affiliation (`Literal`[`'outcast'`, `'member'`, `'admin'`, `'owner'`, `'none'`]) – The affiliation to list.

    Return type:

      `list`[`JID`]

  get_jid_property(room, nick, jid_property, pfrom=None)
    Get the property of a nick in a room, such as its ‘jid’ or ‘affiliation’

      If not found, return None.

    Parameters:

      - room (`JID`) – Get the property for this room.

      - nick (`str`) – Which nickname information to get.

      - jid_property (`Literal`[`'jid'`, `'role'`, `'affiliation'`, `'show'`, `'status'`, `'alt_nick'`]) – Property to fetch.

    Return type:

      `Any`

  get_joined_rooms(pfrom=None)

    Get the list of rooms we sent a join presence to and did not explicitly leave.

    Return type:

      `list`[`JID`]

  get_nick(room, jid, pfrom=None)

    Get the nickname of a specific JID in a room.

    Parameters:

      - room (`JID`) – Room to inspect.

      - jid (`JID`) – FULL JID whose nick to return.

    Return type:

      `str` | `None`

  get_our_jid_in_room(room_jid, pfrom=None)

    Return the jid we’re using in a room.

    Return type:

      `str`

  async get_roles_list(room, role, *, ifrom=None, **iqkwargs)

    “Get a list of JIDs with the specified role

    Parameters:

      - room (`str` | `JID`) – Room to get roles from.

      - role (`Literal`[`'moderator'`, `'participant'`, `'visitor'`, `'none'`]) – The role to list.

    Return type:

      `list`[`str`]

  async get_room_config(room, ifrom=None, **iqkwargs)

    Get the room config form in 0004 plugin format.

    Parameters:

      room (`str` | `JID`) – Room to get the config form from.

    Raises:

      ValueError – When the form is not found.

    Return type:

      `Form`

    Returns:

      A form object.

  get_roster(room, pfrom=None)

    Get the list of nicks in a room.

    Parameters:

      room (`JID`) – Room to list nicks from.

    Return type:

      `list`[`str`]

  invite(room, jid, reason='', *, mfrom=None)

    Invite a jid to a room (mediated invitation).

    Parameters:

      - room (`str` | `JID`) – Room to invite the user in.

      - jid (`str` | `JID`) – JID of the user to invite.

      - reason (`str`) – Reason for inviting the user.

  invite_server(room, jid, invite_from, reason='')

    Send a mediated invite to a user, as a MUC service.

    Added in version 1.8.0.

    Parameters:

      - room (`str` | `JID`) – Room to invite the user in.

      - jid (`str` | `JID`) – JID of the user to invite.

      - invite_from (`str` | `JID`) – JID of the user to send the invitation from.

      - reason (`str`) – Reason for inviting the user.

  jid_in_room(room, jid, pfrom=None)

    Check if a JID is present in a room.

    Parameters:

      - room (`JID`) – Room to check.

      - jid (`JID`) – full JID to check.

    Return type:

      `bool`

  join_groupchat(room, nick, maxhistory='0', password='', pstatus='', pshow='chat', pfrom='')

    Join the specified room, requesting ‘maxhistory’ lines of history.

    Deprecated since version 1.8.0: `join_muc_wait()` will replace this old API starting from version 1.9.0.

    Return type:

      `Future`

  async join_groupchat_wait(room, nick, *, password=None, maxchars=None, maxstanzas=None, seconds=None, since=None, presence_options=None, timeout=300)

    Try to join a MUC and block until we are joined or get an error.

    Only one of {maxchars, maxstanzas, seconds, since} will be used, in that order.

    Added in version 1.8.0.

    Parameters:

      - room (`JID`) – Room JID

      - nick (`str`) – User nickname in the room

      - password (`str` | `None`) – The optional room password.

      - maxchars (`int` | `None`) – Max number of characters to return from history.

      - maxstanzas (`int` | `None`) – Max number of stanzas to return from history.

      - seconds (`int` | `None`) – Fetch history until that many seconds in the past.

      - since (`datetime` | `None`) – Fetch history since that timestamp.

      - timeout (`float`) – Timeout in seconds after which a TimeoutError is raised. None means no timeout.

    Raises:

      A slixmpp.exceptions.PresenceError if the MUC returns a presence error.

    Raises:

      An asyncio.TimeoutError if there is neither success nor presence error when the timeout is reached.

    Return type:

      `tuple`[`Presence`, `Message`, `list`[`Presence`], `list`[`Message`]]

    Returns:

      A tuple containing our own presence, the subject, a list of occupants and a list of history messages.

  join_muc(room, nick, maxhistory='0', password='', pstatus='', pshow='chat', pfrom='')

    Join the specified room, requesting ‘maxhistory’ lines of history.

    Deprecated since version 1.8.0: `join_muc_wait()` will replace this old API starting from version 1.9.0.

    Return type:

      `Future`

  async join_muc_wait(room, nick, *, password=None, maxchars=None, maxstanzas=None, seconds=None, since=None, presence_options=None, timeout=300)

    Try to join a MUC and block until we are joined or get an error.

    Only one of {maxchars, maxstanzas, seconds, since} will be used, in that order.

    Added in version 1.8.0.

    Parameters:

      - room (`JID`) – Room JID

      - nick (`str`) – User nickname in the room

      - password (`str` | `None`) – The optional room password.

      - maxchars (`int` | `None`) – Max number of characters to return from history.

      - maxstanzas (`int` | `None`) – Max number of stanzas to return from history.

      - seconds (`int` | `None`) – Fetch history until that many seconds in the past.

      - since (`datetime` | `None`) – Fetch history since that timestamp.

      - timeout (`float`) – Timeout in seconds after which a TimeoutError is raised. None means no timeout.

    Raises:

      A slixmpp.exceptions.PresenceError if the MUC returns a presence error.

    Raises:

      An asyncio.TimeoutError if there is neither success nor presence error when the timeout is reached.

    Return type:

      `tuple`[`Presence`, `Message`, `list`[`Presence`], `list`[`Message`]]

    Returns:

      A tuple containing our own presence, the subject, a list of occupants and a list of history messages.

  leave_muc(room, nick, msg='', pfrom=None)

    Leave the specified room.

    Parameters:

      - room (`JID`) – Room to leave.

      - nick (`str`) – Your nickname.

      - msg (`str`) – Presence status to use.

    Raises:

      KeyError if the room is not in our room list.

  make_join_stanza(room, nick, *, password=None, maxchars=None, maxstanzas=None, seconds=None, since=None, presence_options=None)

    Build the stanza for the MUC join, without sending it.

    Only one of {maxchars, maxstanzas, seconds, since} will be used, in that order.

    Added in version 1.9.0.

    Parameters:

      - room (`JID`) – Room JID

      - nick (`str`) – User nickname in the room

      - password (`str` | `None`) – The optional room password.

      - maxchars (`int` | `None`) – Max number of characters to return from history.

      - maxstanzas (`int` | `None`) – Max number of stanzas to return from history.

      - seconds (`int` | `None`) – Fetch history until that many seconds in the past.

      - since (`datetime` | `None`) – Fetch history since that timestamp.

    Return type:

      `Presence`

    Returns:

      The presence stanza to send

  request_voice(room, role, *, mfrom=None)

    Request voice in a moderated room.

    Parameters:

      room (`str` | `JID`) – Room to request voice from.

  async send_affiliation_list(room, affiliations, *, ifrom=None, **iqkwargs)

    Send an affiliation delta list.

    Parameters:

      - room (`str` | `JID`) – Room to send the affiliations to.

      - affiliations (`list`[`tuple`[`str` | `JID`, `Literal`[`'outcast'`, `'member'`, `'admin'`, `'owner'`, `'none'`]]]) – List of couples (jid, affiliation) to set.

  async send_role_list(room, roles, *, ifrom=None, **iqkwargs)

    Send a role delta list.

    Parameters:

      - room (`str` | `JID`) – Room to send the roles to.

      - roles (`list`[`tuple`[`str`, `Literal`[`'moderator'`, `'participant'`, `'visitor'`, `'none'`]]]) – List of couples (nick, role) to set.

  async set_affiliation(room, affiliation, *, jid=None, nick=None, reason='', ifrom=None, **iqkwargs)

    Change room affiliation for a JID or nickname.

    Parameters:

      - room (`str` | `JID`) – Room to modify.

      - affiliation (`Literal`[`'outcast'`, `'member'`, `'admin'`, `'owner'`, `'none'`]) – Affiliation to set.

      - jid (`str` | `JID` | `None`) – User JID to use in the set operation.

      - reason (`str`) – Reason for the affiliation change.

  async set_role(room, nick, role, *, reason='', ifrom=None, **iqkwargs)

    Change role property of a nick in a room. Typically, roles are temporary (they last only as long as you are in the room), whereas affiliations are permanent (they last across groupchat sessions).

    Parameters:

      - room (`str` | `JID`) – Room to modify.

      - nick (`str`) – User nickname to use in the set operation.

      - role (`Literal`[`'moderator'`, `'participant'`, `'visitor'`, `'none'`]) – Role to set.

      - reason (`str`) – Reason for the role change.

  async set_room_config(room, config, *, ifrom=None, **iqkwargs)

    Send a room config form.

    Parameters:

      - room (`str` | `JID`) – Room to send the form to.

      - config (`Form`) – A filled room form.

  async set_self_nick(room, new_nick, timeout=60, presence_options=None)

    Set your nickname in a room. The room can arbitrarily decide on another nickname, so this function waits for the response and returns the final nickname.

    Added in version 1.9.0.

    Parameters:

      - room (`JID`) – Room in which to change our nickname

      - new_nick (`str`) – Our new nickname in the room

      - timeout (`float`) – Time in seconds to wait for our new nickname response

      - pfrom – (for components) the JID to send our presence from

    Return type:

      `str`

  set_subject(room, subject, *, mfrom=None)

    Set a room’s subject.

    Parameters:

      - room (`str` | `JID`) – JID of the room.

      - subject (`str`) – Room subject to set.

## Stanza elements

class slixmpp.plugins.xep_0045.stanza.MUCActor(xml=None, parent=None)
  get_jid()
    Return type:

      `JID` | `None`

  interfaces: ClassVar[set[str]] = {'jid', 'nick'}

    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] = 'actor'

    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 = 'http://jabber.org/protocol/muc#user'

    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] = 'actor'

    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']

class slixmpp.plugins.xep_0045.stanza.MUCAdminItem(xml=None, parent=None)
  interfaces: ClassVar[set[str]] = {'affiliation', 'jid', 'nick', 'reason', 'role'}

    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] = 'item'

    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 = 'http://jabber.org/protocol/muc#admin'

    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] = 'item'

    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']

  sub_interfaces: ClassVar[set[str]] = {'reason'}

    A subset of `interfaces` which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.

class slixmpp.plugins.xep_0045.stanza.MUCAdminQuery(xml=None, parent=None)
  name: ClassVar[str] = 'query'

    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 = 'http://jabber.org/protocol/muc#admin'

    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] = 'mucadmin_query'

    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']

class slixmpp.plugins.xep_0045.stanza.MUCBase(xml=None, parent=None)
  del_affiliation()
  del_item_attr(attr)
  del_jid()
  del_nick()
  del_role()
  del_room()
  del_status_codes()
  get_affiliation()
  get_item_attr(attr, default)
  get_item_nick()
    Return type:

      `str`

  get_jid()
    Return type:

      `JID`

  get_nick()
    Return type:

      `str`

  get_role()
    Return type:

      `str`

  get_room()
    Return type:

      `str`

  get_status_codes()
    Return type:

      `set`[`int`]

  interfaces: ClassVar[set[str]] = {'affiliation', 'item_nick', 'jid', 'nick', 'role', 'room', 'status_codes'}

    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] = 'x'

    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 = 'http://jabber.org/protocol/muc#user'

    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] = 'muc'

    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']

  set_affiliation(value)
  set_item_attr(attr, value)
  set_item_nick(value)
    Return type:

      `str`

  set_jid(value)
  set_nick(value)
  set_role(value)
  set_room(value)
  set_status_codes(codes)

class slixmpp.plugins.xep_0045.stanza.MUCDecline(xml=None, parent=None)
  get_from()
    Return type:

      `JID`

  get_to()
    Return type:

      `JID`

  interfaces: ClassVar[set[str]] = {'from', 'reason', 'to'}

    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] = 'decline'

    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 = 'http://jabber.org/protocol/muc#user'

    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] = 'decline'

    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']

  set_from(value)
  set_to(value)
  sub_interfaces: ClassVar[set[str]] = {'reason'}

    A subset of `interfaces` which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.

class slixmpp.plugins.xep_0045.stanza.MUCDestroy(xml=None, parent=None)
  interfaces: ClassVar[set[str]] = {'jid', 'reason'}

    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] = 'destroy'

    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 = 'http://jabber.org/protocol/muc#user'

    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] = 'destroy'

    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']

  sub_interfaces: ClassVar[set[str]] = {'reason'}

    A subset of `interfaces` which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.

class slixmpp.plugins.xep_0045.stanza.MUCHistory(xml=None, parent=None)
  interfaces: ClassVar[set[str]] = {'maxchars', 'maxstanzas', 'seconds', 'since'}

    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] = 'history'

    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 = 'http://jabber.org/protocol/muc'

    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] = 'history'

    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']

class slixmpp.plugins.xep_0045.stanza.MUCInvite(xml=None, parent=None)
  get_from()
    Return type:

      `JID`

  get_to()
    Return type:

      `JID`

  interfaces: ClassVar[set[str]] = {'from', 'password', 'reason', 'to'}

    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] = 'invite'

    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 = 'http://jabber.org/protocol/muc#user'

    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] = 'invite'

    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']

  set_from(value)
  set_to(value)
  sub_interfaces: ClassVar[set[str]] = {'password', 'reason'}

    A subset of `interfaces` which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.

class slixmpp.plugins.xep_0045.stanza.MUCJoin(xml=None, parent=None)
  interfaces: ClassVar[set[str]] = {'password'}

    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] = 'x'

    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 = 'http://jabber.org/protocol/muc'

    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] = 'muc_join'

    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']

  sub_interfaces: ClassVar[set[str]] = {'password'}

    A subset of `interfaces` which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.

class slixmpp.plugins.xep_0045.stanza.MUCMessage(xml=None, parent=None)

  A MUC Message

      <message from='foo@muc/user1' type='groupchat' id='someid'>
          <body>Foo</body>
          <x xmlns='http://jabber.org/protocol/muc#user'>
              <item affiliation='none'
                    role='none'
                    nick='newnick2'
                    jid='some@jid'/>
          </x>
      </message>

class slixmpp.plugins.xep_0045.stanza.MUCOwnerDestroy(xml=None, parent=None)
  interfaces: ClassVar[set[str]] = {'jid', 'reason'}

    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] = 'destroy'

    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 = 'http://jabber.org/protocol/muc#owner'

    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] = 'destroy'

    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']

  sub_interfaces: ClassVar[set[str]] = {'reason'}

    A subset of `interfaces` which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.

class slixmpp.plugins.xep_0045.stanza.MUCOwnerQuery(xml=None, parent=None)
  name: ClassVar[str] = 'query'

    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 = 'http://jabber.org/protocol/muc#owner'

    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] = 'mucowner_query'

    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']

class slixmpp.plugins.xep_0045.stanza.MUCPresence(xml=None, parent=None)

  A MUC Presence

      <presence from='foo@muc/user1' type='unavailable'>
          <x xmlns='http://jabber.org/protocol/muc#user'>
              <item affiliation='none'
                    role='none'
                    nick='newnick2'
                    jid='some@jid'/>
              <status code='303'/>
          </x>
      </presence>

class slixmpp.plugins.xep_0045.stanza.MUCStatus(xml=None, parent=None)
  interfaces: ClassVar[set[str]] = {'code'}

    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] = 'status'

    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 = 'http://jabber.org/protocol/muc#user'

    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] = 'status'

    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']

  set_code(code)

class slixmpp.plugins.xep_0045.stanza.MUCUserItem(xml=None, parent=None)
  get_jid()
    Return type:

      `JID` | `None`

  interfaces: ClassVar[set[str]] = {'affiliation', 'jid', 'nick', 'reason', 'role'}

    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] = 'item'

    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 = 'http://jabber.org/protocol/muc#user'

    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] = 'item'

    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']

  plugin_multi_attrib: ClassVar[str] = 'items'

    For `ElementBase` subclasses that are intended to be an iterable group of items, the `plugin_multi_attrib` value defines an interface for the parent stanza which returns the entire group of matching substanzas. So the following are equivalent:

        # Given stanza class Foo, with plugin_multi_attrib = 'foos'
        parent['foos']
        filter(isinstance(item, Foo), parent['substanzas'])

  sub_interfaces: ClassVar[set[str]] = {'reason'}

    A subset of `interfaces` which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.

slixmpp.plugins.xep_0045.stanza.register_plugins()

  Load MUC support on presence stanzas.

  Return type:

    `None`