Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2011-10-30 16:27:32 +0400
committerYann Leboulanger <asterix@lagaule.org>2011-10-30 16:27:32 +0400
commit493187d448d4d89a20f4ccc66924fefe55e7fe86 (patch)
treeef47e54db0158d4015230fad9995716a82136e1b /src/common/xmpp
parent19306fbf6f7110c937101e478c9ff7167449131b (diff)
implement XEP-0306 : status conditions for MUC
Diffstat (limited to 'src/common/xmpp')
-rw-r--r--src/common/xmpp/protocol.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/xmpp/protocol.py b/src/common/xmpp/protocol.py
index 7e46d07f4..8dc1cec2e 100644
--- a/src/common/xmpp/protocol.py
+++ b/src/common/xmpp/protocol.py
@@ -53,6 +53,7 @@ NS_CAPTCHA = 'urn:xmpp:captcha' # XEP-0158
NS_CHATSTATES = 'http://jabber.org/protocol/chatstates' # JEP-0085
NS_CHATTING = 'http://jabber.org/protocol/chatting' # XEP-0194
NS_CLIENT = 'jabber:client'
+NS_CONDITIONS = 'urn:xmpp:muc:conditions:0' # XEP-0306
NS_COMMANDS = 'http://jabber.org/protocol/commands'
NS_COMPONENT_ACCEPT = 'jabber:component:accept'
NS_COMPONENT_1 = 'http://jabberd.jabberstudio.org/ns/component/1.0'
@@ -625,6 +626,17 @@ class Protocol(Node):
"""
return self.getTagAttr('error', 'code')
+ def getStatusConditions(self):
+ """
+ Return the status conditions list as defined in XEP-0306.
+ """
+ conds = []
+ condtag = self.getTag('conditions', namespace=NS_CONDITIONS)
+ if condtag:
+ for tag in condtag.getChildren():
+ conds.append(tag.getName())
+ return conds
+
def setError(self, error, code=None):
"""
Set the error code. Obsolete. Use error-conditions instead