slidge.group.participant

Module Contents

Classes

LegacyParticipant

A legacy participant of a legacy group chat.

class slidge.group.participant.LegacyParticipant(muc, nickname=None, is_user=False, is_system=False, role='participant', affiliation='member')

A legacy participant of a legacy group chat.

Parameters:
  • muc (slidge.group.room.LegacyMUC) –

  • nickname (Optional[str]) –

  • role (slidge.util.types.MucRole) –

  • affiliation (slidge.util.types.MucAffiliation) –

send_initial_presence(full_jid, nick_change=False, presence_id=None)

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()

Call this when the participant leaves the room

kick()

Call this when the participant is kicked from the room

ban()

Call this when the participant is banned from the room