XEP 0045¶
-
class
slixmpp.plugins.xep_0045.
XEP_0045
(xmpp, config=None)[source]¶ Implements XEP-0045 Multi-User Chat
-
async
cancel_config
(room, *, ifrom=None, **iqkwargs)[source]¶ Cancel a requested config form
- Return type
Iq
-
async
destroy
(room, reason='', altroom='', *, ifrom=None, **iqkwargs)[source]¶ Destroy a room.
- Return type
Iq
-
async
get_affiliation_list
(room, affiliation, *, ifrom=None, **iqkwargs)[source]¶ “Get a list of JIDs with the specified affiliation
- Return type
List
[JID
]
-
get_jid_property
(room, nick, jid_property)[source]¶ Get the property of a nick in a room, such as its ‘jid’ or ‘affiliation’ If not found, return None.
-
async
get_roles_list
(room, role, *, ifrom=None, **iqkwargs)[source]¶ “Get a list of JIDs with the specified role
- Return type
List
[str
]
-
handle_groupchat_subject
(msg)[source]¶ Handle a message coming from a muc indicating a change of subject (or announcing it when joining the room)
- Return type
-
join_muc
(room, nick, maxhistory='0', password='', pstatus='', pshow='', pfrom='')[source]¶ Join the specified room, requesting ‘maxhistory’ lines of history.
-
async
send_affiliation_list
(room, affiliations, *, ifrom=None, **iqkwargs)[source]¶ Send an affiliation delta list
- Return type
Iq
-
async
send_role_list
(room, roles, *, ifrom=None, **iqkwargs)[source]¶ Send a role delta list
- Return type
Iq
-
async
set_affiliation
(room, jid=None, nick=None, *, affiliation, ifrom=None, **iqkwargs)[source]¶ Change room affiliation.
-
async
set_role
(room, nick, role, *, ifrom=None, **iqkwargs)[source]¶ 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).
- Return type
Iq
-
async
set_room_config
(room, config, *, ifrom=None, **iqkwargs)[source]¶ Send a room config form
- Return type
Iq
-
stanza
= <module 'slixmpp.plugins.xep_0045.stanza' from '/home/docs/checkouts/readthedocs.org/user_builds/slixmpp/checkouts/slix-1.6.0/slixmpp/plugins/xep_0045/stanza.py'>¶
-
async
Stanza elements¶
Slixmpp: The Slick XMPP Library Copyright (C) 2010 Nathanael C. Fritz Copyright (C) 2020 “Maxime “pep” Buquet <pep@bouah.net>” This file is part of Slixmpp.
See the file LICENSE for copying permission.
-
class
slixmpp.plugins.xep_0045.stanza.
MUCAdminItem
(xml=None, parent=None)[source]¶ -
interfaces
= {'affiliation', 'jid', 'nick', 'role'}¶
-
name
= 'item'¶
-
namespace
= 'http://jabber.org/protocol/muc#admin'¶
-
plugin_attrib
= 'item'¶
-
-
class
slixmpp.plugins.xep_0045.stanza.
MUCAdminQuery
(xml=None, parent=None)[source]¶ -
name
= 'query'¶
-
namespace
= 'http://jabber.org/protocol/muc#admin'¶
-
plugin_attrib
= 'mucadmin_query'¶
-
-
class
slixmpp.plugins.xep_0045.stanza.
MUCBase
(xml=None, parent=None)[source]¶ -
-
interfaces
= {'affiliation', 'jid', 'nick', 'role', 'room', 'status_codes'}¶
-
name
= 'x'¶
-
namespace
= 'http://jabber.org/protocol/muc#user'¶
-
plugin_attrib
= 'muc'¶
-
-
class
slixmpp.plugins.xep_0045.stanza.
MUCDecline
(xml=None, parent=None)[source]¶ -
interfaces
= {'from', 'reason', 'to'}¶
-
name
= 'decline'¶
-
namespace
= 'http://jabber.org/protocol/muc#user'¶
-
plugin_attrib
= 'decline'¶
-
sub_interfaces
= {'reason'}¶
-
-
class
slixmpp.plugins.xep_0045.stanza.
MUCHistory
(xml=None, parent=None)[source]¶ -
interfaces
= {'maxchars', 'maxstanzas', 'seconds', 'since'}¶
-
name
= 'history'¶
-
namespace
= 'http://jabber.org/protocol/muc'¶
-
plugin_attrib
= 'history'¶
-
-
class
slixmpp.plugins.xep_0045.stanza.
MUCInvite
(xml=None, parent=None)[source]¶ -
interfaces
= {'from', 'reason', 'to'}¶
-
name
= 'invite'¶
-
namespace
= 'http://jabber.org/protocol/muc#user'¶
-
plugin_attrib
= 'invite'¶
-
sub_interfaces
= {'reason'}¶
-
-
class
slixmpp.plugins.xep_0045.stanza.
MUCJoin
(xml=None, parent=None)[source]¶ -
interfaces
= {'password'}¶
-
name
= 'x'¶
-
namespace
= 'http://jabber.org/protocol/muc'¶
-
plugin_attrib
= 'muc_join'¶
-
sub_interfaces
= {'password'}¶
-
-
class
slixmpp.plugins.xep_0045.stanza.
MUCMessage
(xml=None, parent=None)[source]¶ 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)[source]¶ -
interfaces
= {'jid', 'reason'}¶
-
name
= 'destroy'¶
-
plugin_attrib
= 'destroy'¶
-
sub_interfaces
= {'reason'}¶
-
-
class
slixmpp.plugins.xep_0045.stanza.
MUCOwnerQuery
(xml=None, parent=None)[source]¶ -
name
= 'query'¶
-
namespace
= 'http://jabber.org/protocol/muc#owner'¶
-
plugin_attrib
= 'mucowner_query'¶
-
-
class
slixmpp.plugins.xep_0045.stanza.
MUCPresence
(xml=None, parent=None)[source]¶ 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>