slidge.core.muc.participant#

Module Contents#

Classes#

Attributes#

log

class slidge.core.muc.participant.LegacyParticipant(muc, nickname=None, is_user=False, is_system=False)[source]#

Bases: slidge.core.mixins.PresenceMixin, slidge.core.mixins.MessageMixin, slidge.core.mixins.ChatterDiscoMixin

Parameters:
property DISCO_NAME[source]#
mtype: slixmpp.types.MessageTypes = 'groupchat'[source]#
_can_send_carbon = False[source]#
USE_STANZA_ID = True[source]#
STRIP_SHORT_DELAY = False[source]#
__repr__()[source]#

Return repr(self).

_make_presence(*, last_seen=None, status_codes=None, user_full_jid=None, **presence_kwargs)[source]#
Parameters:
  • last_seen (Optional[datetime.datetime]) –

  • status_codes (Optional[set[int]]) –

  • user_full_jid (Optional[slixmpp.JID]) –

__send_presence_if_needed(stanza, full_jid, archive_only)[source]#
Parameters:
  • stanza (Union[slixmpp.Message, slixmpp.Presence]) –

  • full_jid (slixmpp.JID) –

  • archive_only (bool) –

_send(stanza, full_jid=None, archive_only=False, **send_kwargs)[source]#
Parameters:
  • stanza (Union[slixmpp.Message, slixmpp.Presence]) –

  • full_jid (Optional[slixmpp.JID]) –

mucadmin_item()[source]#
send_initial_presence(full_jid, nick_change=False, presence_id=None)[source]#

Called when the user joins a MUC, as a mechanism to indicate to the joining XMPP client the list of “participants”.

Can be called this to trigger a “participant has joined the group” event.

Parameters:
  • full_jid (slixmpp.JID) – Set this to only send to a specific user XMPP resource.

  • nick_change – Used when the user joins and the MUC renames them (code 210)

  • presence_id (Optional[str]) – set the presence ID. used internally by slidge

leave()[source]#

To be called only by room. To remove a participant, call Room.remove_participant(self) instead.

get_disco_info()[source]#
moderate(legacy_msg_id, reason=None)[source]#
Parameters:
  • legacy_msg_id (slidge.util.types.LegacyMessageType) –

  • reason (Optional[str]) –

slidge.core.muc.participant.log[source]#