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

github.com/Jajcus/pyxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/pyxmpp
diff options
context:
space:
mode:
authorJacek Konieczny <jajcus@jajcus.net>2009-06-17 14:14:15 +0400
committerJacek Konieczny <jajcus@jajcus.net>2009-06-17 14:14:15 +0400
commitcdf2e965c35c863d5fdfd2fc04dfd388fa0d7ee8 (patch)
treefc32d5dc75bda64ee3e84ea816bf0bf85ae87763 /pyxmpp
parentefad24416773457a96bab10d8aef04bd78892456 (diff)
- do not add 'role' attribute an <item/> element when the role is not
specified. Patch by: Victor Nakoryakov
Diffstat (limited to 'pyxmpp')
-rw-r--r--pyxmpp/jabber/muccore.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pyxmpp/jabber/muccore.py b/pyxmpp/jabber/muccore.py
index 4f0172e..b17781a 100644
--- a/pyxmpp/jabber/muccore.py
+++ b/pyxmpp/jabber/muccore.py
@@ -404,7 +404,8 @@ class MucItem(MucItemBase):
if self.reason:
n.newTextChild(None,"reason",to_utf8(self.reason))
n.setProp("affiliation",to_utf8(self.affiliation))
- n.setProp("role",to_utf8(self.role))
+ if self.role:
+ n.setProp("role",to_utf8(self.role))
if self.jid:
n.setProp("jid",to_utf8(self.jid.as_unicode()))
if self.nick: