comparison src/plugins/plugin_xep_0249.py @ 1994:a5eb6f6b8db2

plugin XEP_0249: fixed bad use of namespace in addElement
author Goffi <goffi@goffi.org>
date Sun, 10 Jul 2016 12:26:42 +0200
parents 200cd707a46d
children 48536a22b599
comparison
equal deleted inserted replaced
1993:981e2abbb56c 1994:a5eb6f6b8db2
102 if not profile: 102 if not profile:
103 log.error(_("Profile doesn't exists !")) 103 log.error(_("Profile doesn't exists !"))
104 return 104 return
105 message = domish.Element((None, 'message')) 105 message = domish.Element((None, 'message'))
106 message["to"] = target.full() 106 message["to"] = target.full()
107 x_elt = message.addElement('x', NS_DIRECT_MUC_INVITATION) 107 x_elt = message.addElement((NS_DIRECT_MUC_INVITATION, 'x'))
108 x_elt['jid'] = room.userhost() 108 x_elt['jid'] = room.userhost()
109 for opt in options: 109 for opt in options:
110 x_elt[opt] = options[opt] 110 x_elt[opt] = options[opt]
111 self.host.profiles[profile].xmlstream.send(message) 111 self.host.profiles[profile].xmlstream.send(message)
112 112