diff options
author | Jacek Konieczny <jajcus@jajcus.net> | 2009-06-17 14:14:15 +0400 |
---|---|---|
committer | Jacek Konieczny <jajcus@jajcus.net> | 2009-06-17 14:14:15 +0400 |
commit | cdf2e965c35c863d5fdfd2fc04dfd388fa0d7ee8 (patch) | |
tree | fc32d5dc75bda64ee3e84ea816bf0bf85ae87763 /pyxmpp | |
parent | efad24416773457a96bab10d8aef04bd78892456 (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.py | 3 |
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: |