SleekXMPP/sleekxmpp/plugins/xep_0249/stanza.py

40 lines
1.1 KiB
Python
Raw Permalink Normal View History

2011-03-23 14:00:32 +00:00
"""
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2011 Nathanael C. Fritz, Dalek
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
2011-01-10 20:05:05 +00:00
from sleekxmpp.xmlstream import ElementBase
class Invite(ElementBase):
2011-03-23 14:00:32 +00:00
2011-01-10 20:05:05 +00:00
"""
XMPP allows for an agent in an MUC room to directly invite another
user to join the chat room (as opposed to a mediated invitation
done through the server).
Example invite stanza:
<message from='crone1@shakespeare.lit/desktop'
to='hecate@shakespeare.lit'>
<x xmlns='jabber:x:conference'
jid='darkcave@macbeth.shakespeare.lit'
password='cauldronburn'
reason='Hey Hecate, this is the place for all good witches!'/>
</message>
Stanza Interface:
2011-03-23 14:00:32 +00:00
jid -- The JID of the groupchat room
password -- The password used to gain entry in the room
(optional)
reason -- The reason for the invitation (optional)
2011-01-10 20:05:05 +00:00
"""
2011-03-23 14:00:32 +00:00
2011-01-10 20:05:05 +00:00
name = "x"
namespace = "jabber:x:conference"
plugin_attrib = "groupchat_invite"
2011-03-23 14:00:32 +00:00
interfaces = ("jid", "password", "reason")