comparison src/plugins/plugin_xep_0065.py @ 536:a31abb97310d

core, plugins: fixed bad namespace in stanza creation
author Goffi <goffi@goffi.org>
date Thu, 01 Nov 2012 22:41:39 +0100
parents 2a072735e459
children 2c4016921403
comparison
equal deleted inserted replaced
535:790be337cc41 536:a31abb97310d
692 factory = Socks5ClientFactory(self.current_stream, sid, iq_elt["id"], self.activateStream, self._killId) 692 factory = Socks5ClientFactory(self.current_stream, sid, iq_elt["id"], self.activateStream, self._killId)
693 reactor.connectTCP(sh_host, int(sh_port), factory) 693 reactor.connectTCP(sh_host, int(sh_port), factory)
694 694
695 def activateStream(self, sid, iq_id): 695 def activateStream(self, sid, iq_id):
696 debug(_("activating stream")) 696 debug(_("activating stream"))
697 result = domish.Element(('', 'iq')) 697 result = domish.Element((None, 'iq'))
698 data = self.current_stream[sid] 698 data = self.current_stream[sid]
699 result['type'] = 'result' 699 result['type'] = 'result'
700 result['id'] = iq_id 700 result['id'] = iq_id
701 result['from'] = data["to"].full() 701 result['from'] = data["to"].full()
702 result['to'] = data["from"].full() 702 result['to'] = data["from"].full()
709 def sendNotAcceptableError(self, iq_id, to_jid, xmlstream): 709 def sendNotAcceptableError(self, iq_id, to_jid, xmlstream):
710 """Not acceptable error used when the stream is not expected or something is going wrong 710 """Not acceptable error used when the stream is not expected or something is going wrong
711 @param iq_id: IQ id 711 @param iq_id: IQ id
712 @param to_jid: addressee 712 @param to_jid: addressee
713 @param xmlstream: XML stream to use to send the error""" 713 @param xmlstream: XML stream to use to send the error"""
714 result = domish.Element(('', 'iq')) 714 result = domish.Element((None, 'iq'))
715 result['type'] = 'result' 715 result['type'] = 'result'
716 result['id'] = iq_id 716 result['id'] = iq_id
717 result['to'] = to_jid 717 result['to'] = to_jid
718 error_el = result.addElement('error') 718 error_el = result.addElement('error')
719 error_el['type'] = 'modify' 719 error_el['type'] = 'modify'
723 def sendBadRequestError(self, iq_id, to_jid, xmlstream): 723 def sendBadRequestError(self, iq_id, to_jid, xmlstream):
724 """Not acceptable error used when the stream is not expected or something is going wrong 724 """Not acceptable error used when the stream is not expected or something is going wrong
725 @param iq_id: IQ id 725 @param iq_id: IQ id
726 @param to_jid: addressee 726 @param to_jid: addressee
727 @param xmlstream: XML stream to use to send the error""" 727 @param xmlstream: XML stream to use to send the error"""
728 result = domish.Element(('', 'iq')) 728 result = domish.Element((None, 'iq'))
729 result['type'] = 'result' 729 result['type'] = 'result'
730 result['id'] = iq_id 730 result['id'] = iq_id
731 result['to'] = to_jid 731 result['to'] = to_jid
732 error_el = result.addElement('error') 732 error_el = result.addElement('error')
733 error_el['type'] = 'cancel' 733 error_el['type'] = 'cancel'