muc — Multi-User-Chat support (XEP-0045)¶
This subpackage provides client-side support for XEP-0045.
New in version 0.5.
Changed in version 0.9: Nearly the whole public interface of this module has been re-written in
0.9 to make it coherent with the Modern IM interface defined by
aioxmpp.im.
Using Multi-User-Chats¶
To start using MUCs in your application, you have to load the Service
into the client, using summon().
- 
class aioxmpp.MUCClient(client, **kwargs)[source]¶
- Conversation Implementation for Multi-User Chats (XEP-0045). - See also - AbstractConversationService
- for useful common signals
 - This service provides access to Multi-User Chats using the conversation interface defined by - aioxmpp.im.- Client service implementing the a Multi-User Chat client. By loading it into a client, it is possible to join multi-user chats and implement interaction with them. - Private Messages into the MUC are not handled by this service. They are handled by the normal - p2p.Service.- 
join(mucjid, nick, *, password=None, history=None, autorejoin=True)[source]¶
- Join a multi-user chat and create a conversation for it. - Parameters: - mucjid (JID.) – The bare JID of the room to join.
- nick (str) – The nickname to use in the room.
- password (str) – The password to join the room, if required.
- history (xso.History) – Specification for how much and which history to fetch.
- autorejoin (bool) – Flag to indicate that the MUC should be automatically rejoined after a disconnect.
 - Raises: - ValueError – if the MUC JID is invalid. - Returns: - The Conversation and a future on the join. - Return type: - tuple of - Roomand- asyncio.Future.- Join a multi-user chat at mucjid with nick. Return a - Roominstance which is used to track the MUC locally and a- aioxmpp.Futurewhich becomes done when the join succeeded (with a- Nonevalue) or failed (with an exception).- In addition, the - on_conversation_added()signal is emitted immediately with the new- Room.- It is recommended to attach the desired signals to the - Roombefore yielding next (e.g. in a non-deferred event handler to the- on_conversation_added()signal), to avoid races with the server. It is guaranteed that no signals are emitted before the next yield, and thus, it is safe to attach the signals right after- join()returned. (This is also the reason why- join()is not a coroutine, but instead returns the room and a future to wait for.)- Any other interaction with the room must go through the - Roominstance.- If the multi-user chat at mucjid is already or currently being joined, the existing - Roomand future is returned. The nick and other options for the new join are ignored.- If the mucjid is not a bare JID, - ValueErroris raised.- password may be a string used as password for the MUC. It will be remembered and stored at the returned - Roominstance.- history may be a - Historyinstance to request a specific amount of history; otherwise, the server will return a default amount of history.- If autorejoin is true, the MUC will be re-joined after the stream has been destroyed and re-established. In that case, the service will request history since the stream destruction and ignore the history object passed here. - If the stream is currently not established, the join is deferred until the stream is established. 
- mucjid (
 - Manage rooms: - 
coroutine get_room_config(mucjid)[source]¶
- Query and return the room configuration form for the given MUC. - Parameters: - mucjid (bare - JID) – JID of the room to query- Returns: - data form template for the room configuration - Return type: - aioxmpp.forms.Data- See also - ConfigurationForm
- for a form template to work with the returned form
 - New in version 0.7. 
 - 
coroutine set_affiliation(mucjid, jid, affiliation, *, reason=None)[source]¶
- Change the affiliation of an entity with a MUC. - Parameters: - Change the affiliation of the given jid with the MUC identified by the bare mucjid to the given new affiliation. Optionally, a reason can be given. - If you are joined in the MUC, - Room.muc_set_affiliation()may be more convenient, but it is possible to modify the affiliations of a MUC without being joined, given sufficient privilegues.- Setting the different affiliations require different privilegues of the local user. The details can be checked in XEP-0045 and are enforced solely by the server, not local code. - The coroutine returns when the change in affiliation has been acknowledged by the server. If the server returns an error, an appropriate - aioxmpp.errors.XMPPErrorsubclass is raised.
 - 
coroutine set_room_config(mucjid, data)[source]¶
- Set the room configuration using a XEP-0004 data form. - Parameters: - mucjid (bare JID) – JID of the room to query
- data (aioxmpp.forms.Data) – Filled-out configuration form
 - See also - ConfigurationForm
- for a form template to generate the required form
 - A sensible workflow to, for example, set a room to be moderated, could be this: - form = aioxmpp.muc.ConfigurationForm.from_xso( (await muc_service.get_room_config(mucjid)) ) form.moderatedroom = True await muc_service.set_rooom_config(mucjid, form.render_reply()) - New in version 0.7. 
- mucjid (bare 
 - Global events: - 
signal on_muc_invitation(stanza, muc_address, inviter_address, mode, *, password=None, reason=None, **kwargs)¶
- Emits when a MUC invitation has been received. - New in version 0.10. - Parameters: - stanza (aioxmpp.Message) – The stanza containing the invitation.
- muc_address (aioxmpp.JID) – The address of the MUC to which the invitation points.
- inviter_address (aioxmpp.JIDorNone) – The address of the inviter.
- mode (im.InviteMode) – The type of the invitation.
- password (strorNone) – Password for the MUC.
- reason (strorNone) – Text accompanying the invitation.
 - The format of the inviter_address depends on the mode: - DIRECT
- For direct invitations, the inviter_address is the full or bare JID of the entity which sent the invitation. Usually, this will be a full JID of a users client.
- MEDIATED
- For mediated invitations, the inviter_address is either the
occupant JID of the inviting occupant or the real bare or full JID
of the occupant (XEP-0045 leaves it up to the service to decide).
May also be None.
 - Warning - Neither invitation type is perfect and has issues. Mediated invites can easily be spoofed by MUCs (both their intent and the inviter address) and might be used by spam rooms to trick users into joining. Direct invites may not reach the recipient due to local policy, but they allow proper sender attribution. - inviter_address values which are not an occupant JID should not be trusted for mediated invites! - How to deal with this is a policy decision which - aioxmppcan not make for your application.
- stanza (
 - Changed in version 0.8: This class was formerly known as - aioxmpp.muc.Service. It is still available under that name, but the alias will be removed in 1.0.- Changed in version 0.9: This class was completely remodeled in 0.9 to conform with the - aioxmpp.iminterface.- Changed in version 0.10: This class now conforms to the - AbstractConversationServiceinterface.
- 
class aioxmpp.muc.Service¶
- Alias of - MUCClient.- Deprecated since version 0.8: The alias will be removed in 1.0. 
The service returns Room objects which are used to track joined MUCs:
- 
class aioxmpp.muc.Room(service, mucjid)[source]¶
- Conversation representing a single XEP-0045 Multi-User Chat. - Note - This is an implementation of - AbstractConversation. The members which do not carry the- muc_prefix usually have more extensive documentation there. This documentation here only provides a short synopsis for those members plus the changes with respect to the base interface.- Changed in version 0.9: In 0.9, the - Roominterface was re-designed to match- AbstractConversation.- The following properties are provided: - 
features¶
- The set of features supported by this MUC. This may vary depending on features exported by the MUC service, so be sure to check this for each individual MUC. 
 - 
jid¶
- The (bare) - aioxmpp.JIDof the MUC which this- Roomtracks.
 - 
me¶
- A - Occupantinstance which tracks the local user. This is- Noneuntil- on_enter()is emitted; it is never set to- Noneagain, but the identity of the object changes on each- on_enter().
 - 
members¶
- A copy of the list of occupants. The local user is always the first item in the list, unless the - on_enter()has not fired yet.
 - 
service_member¶
- A - ServiceMemberobject which represents the MUC service itself.- This is used when messages from the MUC service are received. - See also - service_member
- For more documentation on the semantics of
service_member.
 - New in version 0.10. 
 - These properties are specific to MUC: - 
muc_active¶
- A boolean attribute indicating whether the connection to the MUC is currently live. - This becomes true when - joinedfirst becomes true. It becomes false whenever the connection to the MUC is interrupted in a way which requires re-joining the MUC (this implies that if stream management is being used, active does not become false on temporary connection interruptions).
 - 
muc_joined¶
- This attribute becomes true when - on_enter()is first emitted and stays true until- on_exit()is emitted.- When it becomes false, the - Roomis removed from the bookkeeping of the- MUCClientto which it belongs and is thus dead.
 - 
muc_state¶
- The state the MUC is in. This is one of the - RoomStateenumeration values. See there for documentation on the meaning.- This state is more detailed than - muc_active.
 - 
muc_subject¶
- The current subject of the MUC, as - LanguageMap.
 - 
muc_subject_setter¶
- The nick name of the entity who set the subject. 
 - 
muc_autorejoin¶
- A boolean flag indicating whether this MUC is supposed to be automatically rejoined when the stream it is used gets destroyed and re-estabished. 
 - 
muc_password¶
- The password to use when (re-)joining. If - autorejoinis- None, this can be cleared after- on_enter()has been emitted.
 - The following methods and properties provide interaction with the MUC itself: - 
coroutine ban(member, reason=None, *, request_kick=True)[source]¶
- Ban an occupant from re-joining the MUC. - Parameters: - request_kick is supported by MUC, but setting it to false has no effect: banned members are always immediately kicked. - See also - AbstractConversation.ban()for the full interface specification.
 - 
coroutine kick(member, reason=None)[source]¶
- Kick an occupant from the MUC. - Parameters: - Raises: - aioxmpp.errors.XMPPError – if the server returned an error for the kick command. - See also - AbstractConversation.kick()for the full interface specification.
 - 
send_message(msg)[source]¶
- Send a message to the MUC. - Parameters: - msg ( - aioxmpp.Message) – The message to send.- Returns: - The stanza token of the message. - Return type: - StanzaToken- There is no need to set the address attributes or the type of the message correctly; those will be overridden by this method to conform to the requirements of a message to the MUC. Other attributes are left untouched (except that - autoset_id()is called) and can be used as desired for the message.- See also - AbstractConversation.send_message()for the full interface specification.
 - 
send_message_tracked(msg)[source]¶
- Send a message to the MUC with tracking. - Parameters: - msg ( - aioxmpp.Message) – The message to send.- Warning - Please read General Remarks about Tracking and Memory Consumption. This is especially relevant for MUCs because tracking is not guaranteed to work due to how XEP-0045 is written. It will work in many cases, probably in all cases you test during development, but it may fail to work for some individual messages and it may fail to work consistently for some services. See the implementation details below for reasons. - The message is tracked and is considered - DELIVERED_TO_RECIPIENTwhen it is reflected back to us by the MUC service. The reflected message is then available in the- responseattribute.- Note - Two things: - The MUC service may change the contents of the message. An example of this is the Prosody developer MUC which replaces messages with more than a few lines with a pastebin link.
- Reflected messages which are caught by tracking are not emitted
through on_message().
 - There is no need to set the address attributes or the type of the message correctly; those will be overridden by this method to conform to the requirements of a message to the MUC. Other attributes are left untouched (except that - autoset_id()is called) and can be used as desired for the message.- Warning - Using - send_message_tracked()before- on_join()has emitted will cause the member object in the resulting- on_message()event to be- None(the message will be delivered just fine).- Using - send_message_tracked()before history replay is over will cause the- on_message()event to be emitted during history replay, even though everyone else in the MUC will – of course – only see the message after the history.- send_message()is not affected by these quirks.- See also - AbstractConversation.send_message_tracked()for the full interface specification.- Implementation details: Currently, we try to detect reflected messages using two different criteria. First, if we see a message with the same message ID (note that message IDs contain 120 bits of entropy) as the message we sent, we consider it as the reflection. As some MUC services re-write the message ID in the reflection, as a fallback, we also consider messages which originate from the correct sender and have the correct body a reflection. - Obviously, this fails consistently in MUCs which re-write the body and re-write the ID and randomly if the MUC always re-writes the ID but only sometimes the body. 
 - 
coroutine set_nick(new_nick)[source]¶
- Change the nick name of the occupant. - Parameters: - new_nick ( - str) – New nickname to use- This sends the request to change the nickname and waits for the request to be sent over the stream. - The nick change may or may not happen, or the service may modify the nickname; observe the - on_nick_change()event.- See also - AbstractConversation.set_nick()for the full interface specification.
 - 
coroutine set_topic(new_topic)[source]¶
- Change the (possibly publicly) visible topic of the conversation. - Parameters: - new_topic ( - str) – The new topic for the conversation.- Request to set the subject to new_topic. new_topic must be a mapping which maps - LanguageTagtags to strings;- Noneis a valid key.
 - 
coroutine muc_request_voice()[source]¶
- Request voice (participant role) in the room and wait for the request to be sent. - The participant role allows occupants to send messages while the room is in moderated mode. - There is no guarantee that the request will be granted. To detect that voice has been granted, observe the - on_role_change()signal.- New in version 0.8. 
 - 
coroutine muc_set_role(nick, role, *, reason=None)[source]¶
- Change the role of an occupant. - Parameters: - Change the role of an occupant, identified by their nick, to the given new role. Optionally, a reason for the role change can be provided. - Setting the different roles require different privilegues of the local user. The details can be checked in XEP-0045 and are enforced solely by the server, not local code. - The coroutine returns when the role change has been acknowledged by the server. If the server returns an error, an appropriate - aioxmpp.errors.XMPPErrorsubclass is raised.
 - 
coroutine muc_set_affiliation(jid, affiliation, *, reason=None)[source]¶
- Convenience wrapper around - MUCClient.set_affiliation(). See there for details, and consider its mucjid argument to be set to- mucjid.
 - The interface provides signals for most of the rooms events. The following keyword arguments are used at several signal handlers (which is also noted at their respective documentation): - muc_actor = None
- The - UserActorinstance of the corresponding- UserExt, describing which other occupant caused the event.- Note that the muc_actor is in fact not a - Occupant.
- muc_reason = None
- The reason text in the corresponding UserExt, which gives more information on why an action was triggered.
 - Note - Signal handlers attached to any of the signals below must accept arbitrary keyword arguments for forward compatibility. For details see the documentation on - AbstractConversation.- 
signal on_enter(**kwargs)¶
- Emits when the initial room - Presencestanza for the local JID is received. This means that the join to the room is complete; the message history and subject are not transferred yet though.- See also - on_muc_enter()
- is an extended version of this signal which contains additional MUC-specific information.
 - Changed in version 0.10: The - on_enter()signal does not receive any arguments anymore to make MUC comply with the- AbstractConversationspec.
 - 
signal on_muc_enter(presence, occupant, *, muc_status_codes=set(), **kwargs)¶
- This is an extended version of - on_enter()which adds MUC-specific arguments.- Parameters: - presence – The initial presence stanza.
- occupant – The Occupantwhich will be used to track the local user.
- muc_status_codes (SetofintorStatusCode) – The set of status codes received in the initial join.
 - New in version 0.10. 
 - 
signal on_message(msg, member, source, **kwargs)¶
- A message occured in the conversation. - Parameters: - msg (aioxmpp.Message) – Message which was received.
- member (Occupant) – The member object of the sender.
- source (MessageSource) – How the message was acquired
 - The notable specialities about MUCs compared to the base specification at - AbstractConversation.on_message()are:- Carbons do not happen for MUC messages. 
- MUC Private Messages are not handled here; see - MUCClientfor MUC PM details.
- MUCs reflect messages; to make this as easy to handle as possible, reflected messages are not emitted via the - on_message()event if and only if they were sent with tracking (see- send_message_tracked()) and they were detected as reflection.- See - send_message_tracked()for details and caveats on the tracking implementation.
 - When history replay happens, since joins and leaves are not part of the history, it is not always possible to reason about the identity of the sender of a history message. To avoid possible spoofing attacks, the following caveats apply to the - Occupantobjects handed as member during history replay:- Two identical Occupantobjects are only used iff the nickname and the actual address of the entity are equal. This implies that unless this client has the permission to see JIDs of occupants of the MUC, allOccupantobjects during history replay will be different instances.
- If the nickname and the actual address of a message from history
match, the current Occupantobject for the respective occupant is used.
- Occupantobjects which are created for history replay are never part of- members. They are only used to convey the information passed in the messages from the history replay, which would otherwise be inaccessible.
 - See also - AbstractConversation.on_message()for the full specification.
- msg (
 - 
signal on_presence_changed(member, resource, presence, **kwargs)¶
- The presence state of an occupant has changed. - Parameters: - member (Occupant) – The member object of the affected member.
- resource (strorNone) – The resource of the member which changed presence.
- presence (aioxmpp.Presence) – The presence stanza
 - resource is always - Nonefor MUCs and unavailable presence implies that the occupant left the room. In this case, only- on_leave()is emitted.- See also - AbstractConversation.on_presence_changed()for the full specification.
- member (
 - 
signal on_nick_changed(member, old_nick, new_nick, *, muc_status_codes=set(), **kwargs)¶
- The nickname of an occupant has changed - Parameters: - The new nickname is already set in the member object. Both old_nick and new_nick are not - None.- See also - AbstractConversation.on_nick_changed()for the full specification.- Changed in version 0.10: The muc_status_codes argument was added. 
 - 
signal on_topic_changed(member, new_topic, *, muc_nick=None, **kwargs)¶
- The topic of the conversation has changed. - Parameters: - member (OccupantorNone) – The member object who changed the topic.
- new_topic (LanguageMap) – The new topic of the conversation.
- muc_nick (str) – The nickname of the occupant who changed the topic.
 - The member is matched by nickname. It is possible that the member is not in the room at the time the topic chagne is received (for example on a join). - muc_nick is always the nickname of the entity who changed the topic. If the entity is currently not joined or has changed nick since the topic was set, member will be - None, but muc_nick is still the nickname of the actor.- Note - on_topic_changed()is emitted during join, iff a topic is set in the MUC.
- member (
 - 
signal on_join(member, **kwargs)¶
- A new occupant has joined the MUC. - Parameters: - member ( - Occupant) – The member object of the new member.- When this signal is called, the member is already included in the - members.
 - 
signal on_leave(member, *, muc_leave_mode=None, muc_actor=None, muc_reason=None, **kwargs)¶
- An occupant has left the conversation. - Parameters: - member (Occupant) – The member object of the previous occupant.
- muc_leave_mode (LeaveModemember) – The cause of the removal.
- muc_actor (UserActor) – The actor object if available.
- muc_reason (str) – The reason for the cause, as given by the actor.
- muc_status_codes (SetofintorStatusCode) – The set of status codes received in the leave notification.
 - When this signal is called, the member has already been removed from the - members.- Changed in version 0.10: The muc_status_codes argument was added. 
- member (
 - 
signal on_muc_suspend()¶
- Emits when the stream used by this MUC gets destroyed (see - on_stream_destroyed()) and the MUC is configured to automatically rejoin the user when the stream is re-established.
 - 
signal on_muc_resume()¶
- Emits when the MUC is about to be rejoined on a new stream. This can be used by implementations to clear their MUC state, as it is emitted before any events like presence are emitted. - The internal state of - Roomis cleared before- on_resume()is emitted, which implies that presence events will be emitted for all occupants on re-join, independent on their presence before the connection was lost.- Note that on a rejoin, all presence is re-emitted. 
 - 
signal on_muc_role_request(form, submission_future)¶
- Emits when an unprivileged occupant requests a role change and the MUC service wants this occupant to approve or deny it. - Parameters: - form (VoiceRequestForm) – The approval form as presented by the service.
- submission_future (asyncio.Future) – A future to which the form to submit must be sent.
 - To decide on a role change request, a handler of this signal must fill in the form and set the form as a result of the submission_future. - Once the result is set, the reply is sent by the MUC service automatically. - It is required for signal handlers to check whether the submission_future is already done before processing the form (as it is possible that multiple handlers are connected to this signal). 
- form (
 - 
signal on_exit(*, muc_leave_mode=None, muc_actor=None, muc_reason=None, muc_status_codes=set(), **kwargs)¶
- Emits when the unavailable - Presencestanza for the local JID is received.- Parameters: - muc_leave_mode (LeaveModemember) – The cause of the removal.
- muc_actor (UserActor) – The actor object if available.
- muc_reason (str) – The reason for the cause, as given by the actor.
- muc_status_codes (SetofintorStatusCode) – The set of status codes received in the leave notification.
 - Note - The keyword arguments muc_actor, muc_reason and muc_status_codes are not always given. Be sure to default them accordingly. - Changed in version 0.10: The muc_status_codes argument was added. 
- muc_leave_mode (
 - The following signals inform users about state changes related to other occupants in the chat room. Note that different events may fire for the same presence stanza. A common example is a ban, which triggers - on_affiliation_change()(as the occupants affiliation is set to- "outcast") and then- on_leave()(with- LeaveMode.BANNEDmode).- 
signal on_muc_affiliation_changed(member, *, actor=None, reason=None, status_codes=set(), **kwargs)¶
- Emits when the affiliation of a member with the room changes. - Parameters: - occupant (Occupant) – The member of the room.
- actor (UserActor) – The actor object if available.
- reason (str) – The reason for the change, as given by the actor.
- status_codes (SetofintorStatusCode) – The set of status codes received in the change notification.
 - occupant is the - Occupantinstance tracking the occupant whose affiliation changed.- Changed in version 0.10: The status_codes argument was added. 
- occupant (
 - 
signal on_muc_role_changed(member, *, actor=None, reason=None, status_codes=set(), **kwargs)¶
- Emits when the role of an occupant in the room changes. - Parameters: - occupant (Occupant) – The member of the room.
- actor (UserActor) – The actor object if available.
- reason (str) – The reason for the change, as given by the actor.
- status_codes (SetofintorStatusCode) – The set of status codes received in the change notification.
 - occupant is the - Occupantinstance tracking the occupant whose role changed.- Changed in version 0.10: The status_codes argument was added. 
- occupant (
 
- 
- 
class aioxmpp.muc.RoomState[source]¶
- Enumeration which describes the state a - Roomis in.- 
JOIN_PRESENCE¶
- The room is in the process of being joined and the presence state transfer is going on. 
 - 
HISTORY¶
- Presence state transfer has happened, but the room subject has not been received yet. This is where history replay messages are received. - When entering this state, - muc_activebecomes true.
 - 
ACTIVE¶
- The join has completed, including history replay and receiving the subject. 
 - 
DISCONNECTED¶
- The MUC is suspended or disconnected. If the MUC is disconnected, - muc_joinedwill be false, too.
 
- 
- 
class aioxmpp.muc.LeaveMode[source]¶
- The different reasons for a user to leave or be removed from MUC. - 
DISCONNECTED¶
- The local client disconnected. This only occurs in events referring to the local entity. 
 - 
SYSTEM_SHUTDOWN¶
- The remote server shut down. 
 - 
NORMAL¶
- The leave was initiated by the occupant themselves and was not a kick or ban. 
 - 
KICKED¶
- The user was kicked from the room. 
 - 
AFFILIATION_CHANGE¶
- Changes in the affiliation of the user caused them to be removed. 
 - 
MODERATION_CHANGE¶
- Changes in the moderation settings of the room caused the user to be removed. 
 - 
BANNED¶
- The user was banned from the room. 
 
- 
Inside rooms, there are occupants:
- 
class aioxmpp.muc.Occupant(occupantjid, is_self, presence_state=<PresenceState available>, presence_status={}, affiliation=None, role=None, jid=None)[source]¶
- A tracking object to track a single occupant in a - Room.- See also - AbstractConversationMember
- for additional notes on some of the pre-defined attributes.
 - 
direct_jid¶
- The real - JIDof the occupant.- If the MUC is anonymous and we do not have the permission to see the real JIDs of occupants, this is - None.
 - 
uid¶
- This is either a random identifier if the real JID of the occupant is not known, or an identifier derived from the real JID of the occupant. - Note that as per the semantics of the - uid, users must treat it as opaque.- See also - uid
- Documentation of the attribute on the base class, with additional information on semantics.
 
 - 
nick¶
- The nickname of the occupant. 
 - 
presence_state¶
- The - PresenceStateof the occupant.
 - 
presence_status¶
- The - LanguageMapholding the presence status text of the occupant.
 
- 
class aioxmpp.muc.ServiceMember(muc_address)[source]¶
- A - AbstractConversationMemberwhich represents a MUC service.- New in version 0.10. - Objects of this instance are used for the - Room.service_memberproperty of rooms.- Aside from the mandatory conversation member attributes, the following attributes for compatibility with - Occupantare provided:- 
nick¶
 - 
presence_stateaioxmpp.structs.PresenceState(False)¶
- The presence state of the service. Always unavailable. 
 - 
presence_status{}¶
- The presence status of the service as - LanguageMap. Always empty.
 
- 
Forms¶
- 
class aioxmpp.muc.ConfigurationForm[source]¶
- This is a XEP-0004 form template (see - aioxmpp.forms) for MUC configuration forms.- The attribute documentation is auto-generated from XEP-0045; see there for details on the semantics of each field. - New in version 0.7. - 
allowinvites¶
- booleanfield- muc#roomconfig_allowinvites- Whether to Allow Occupants to Invite Others 
 - 
allowpm¶
- list-singlefield- muc#roomconfig_allowpm- Roles that May Send Private Messages 
 - 
changesubject¶
- booleanfield- muc#roomconfig_changesubject- Whether to Allow Occupants to Change Subject 
 - 
enablelogging¶
- booleanfield- muc#roomconfig_enablelogging- Whether to Enable Public Logging of Room Conversations 
 - 
getmemberlist¶
- list-multifield- muc#roomconfig_getmemberlist- Roles and Affiliations that May Retrieve Member List 
 - 
lang¶
- text-singlefield- muc#roomconfig_lang- Natural Language for Room Discussions 
 - 
maxhistoryfetch¶
- text-singlefield- muc#maxhistoryfetch- Maximum Number of History Messages Returned by Room 
 - 
maxusers¶
- list-singlefield- muc#roomconfig_maxusers- Maximum Number of Room Occupants 
 - 
membersonly¶
- booleanfield- muc#roomconfig_membersonly- Whether to Make Room Members-Only 
 - 
moderatedroom¶
- booleanfield- muc#roomconfig_moderatedroom- Whether to Make Room Moderated 
 - 
passwordprotectedroom¶
- booleanfield- muc#roomconfig_passwordprotectedroom- Whether a Password is Required to Enter 
 - 
persistentroom¶
- booleanfield- muc#roomconfig_persistentroom- Whether to Make Room Persistent 
 - 
presencebroadcast¶
- list-multifield- muc#roomconfig_presencebroadcast- Roles for which Presence is Broadcasted 
 - 
publicroom¶
- booleanfield- muc#roomconfig_publicroom- Whether to Allow Public Searching for Room 
 - 
pubsub¶
- text-singlefield- muc#roomconfig_pubsub- XMPP URI of Associated Publish-Subscribe Node 
 - 
roomadmins¶
- jid-multifield- muc#roomconfig_roomadmins- Full List of Room Admins 
 - 
roomdesc¶
- text-singlefield- muc#roomconfig_roomdesc- Short Description of Room 
 - 
roomname¶
- text-singlefield- muc#roomconfig_roomname- Natural-Language Room Name 
 - 
roomowners¶
- jid-multifield- muc#roomconfig_roomowners- Full List of Room Owners 
 - 
roomsecret¶
- text-privatefield- muc#roomconfig_roomsecret- The Room Password 
 - 
whois¶
- list-singlefield- muc#roomconfig_whois- Affiliations that May Discover Real JIDs of Occupants 
 
- 
- 
class aioxmpp.muc.InfoForm[source]¶
- 
contactjid¶
- jid-multifield- muc#roominfo_contactjid- Contact Addresses (normally, room owner or owners) 
 - 
description¶
- text-singlefield- muc#roominfo_description- Short Description of Room 
 - 
lang¶
- text-singlefield- muc#roominfo_lang- Natural Language for Room Discussions 
 - 
ldapgroup¶
- text-singlefield- muc#roominfo_ldapgroup- An associated LDAP group that defines room membership; this should be an LDAP Distinguished Name according to an implementation-specific or deployment-specific definition of a group. 
 - 
logs¶
- text-singlefield- muc#roominfo_logs- URL for Archived Discussion Logs 
 - 
maxhistoryfetch¶
- text-singlefield- muc#maxhistoryfetch- Maximum Number of History Messages Returned by Room 
 - 
occupants¶
- text-singlefield- muc#roominfo_occupants- Current Number of Occupants in Room 
 - 
subject¶
- text-singlefield- muc#roominfo_subject- Current Discussion Topic 
 - 
subjectmod¶
- booleanfield- muc#roominfo_subjectmod- The room subject can be modified by participants 
 
- 
XSOs¶
- 
class aioxmpp.muc.StatusCode[source]¶
- This integer enumeration (see - enum.IntEnum) is used for the status codes defined in XEP-0045.- Note that members of this enumeration are equal to their respective integer values, making it ideal for backward- and forward-compatible code and a replacement for magic numbers. - New in version 0.10: Before version 0.10, this enum did not exist and the numeric codes were used bare. Since this is an - IntEnum, it is possible to use the named enum members and their numeric codes interchangably.- 
NON_ANONYMOUS= 100¶
- Included when entering a room where every user can see every users real JID. 
 - 
AFFILIATION_CHANGE= 101¶
- Included in out-of-band messages informing about affiliation changes. 
 - 
SHOWING_UNAVAILABLE= 102¶
- Inform occupants that room now shows unavailable members. 
 - 
NOT_SHOWING_UNAVAILABLE= 103¶
- Inform occupants that room now does not show unavailable members. 
 - 
CONFIG_NON_PRIVACY_RELATED= 104¶
- Inform occupants that a non-privacy related configuration change has occured. 
 - 
SELF= 110¶
- Inform that the stanza refers to the addressee themselves. 
 - 
CONFIG_ROOM_LOGGING= 170¶
- Inform that the room is now logged. 
 - 
CONFIG_NO_ROOM_LOGGING= 171¶
- Inform that the room is not logged anymore. 
 - 
CONFIG_NON_ANONYMOUS= 172¶
- Inform that the room is now not anonymous. 
 - 
CONFIG_SEMI_ANONYMOUS= 173¶
- Inform that the room is now semi-anonymous. 
 - 
CREATED= 201¶
- Inform that the room was created during the join operation. 
 - 
REMOVED_BANNED= 301¶
- Inform that the user was banned from the room. 
 - 
NICKNAME_CHANGE= 303¶
- Inform about new nickname. 
 - 
REMOVED_KICKED= 307¶
- Inform that the occupant was kicked. 
 - 
REMOVED_AFFILIATION_CHANGE= 321¶
- Inform that the occupant was removed from the room due to a change in affiliation. 
 - 
REMOVED_NONMEMBER_IN_MEMBERS_ONLY= 322¶
- Inform that the occupant was removed from the room because the room was changed to members-only and the occupant was not a member. 
 - 
REMOVED_SERVICE_SHUTDOWN= 332¶
- Inform that the occupant is being removed because the MUC service is being shut down. 
 - 
REMOVED_ERROR= 333¶
- Inform that the occupant is being removed because there was an error while communicating with them or their server. 
 
- 
Attributes added to existing XSOs¶
- 
aioxmpp.Message.xep0045_muc¶
- A - GenericExtobject or- None.
- 
aioxmpp.Presence.xep0045_muc¶
- A - GenericExtobject or- None.
- 
aioxmpp.Message.xep0249_direct_invite¶
- A - DirectInviteobject or- None.
Generic namespace¶
User namespace¶
- 
class aioxmpp.muc.xso.UserExt(status_codes=[], destroy=None, decline=None, invites=[], items=[], password=None)[source]¶