comparison src/plugins/plugin_xep_0050.py @ 1079:c0ef97002ef4

reverted commit bb4517e69957: note was not implemented on purpose
author Goffi <goffi@goffi.org>
date Wed, 18 Jun 2014 16:35:20 +0200
parents 387bbc459d8f
children 36c1bbb8ca24
comparison
equal deleted inserted replaced
1078:bb4517e69957 1079:c0ef97002ef4
260 else: 260 else:
261 return None 261 return None
262 remote_session_id = command_elt.getAttribute('sessionid') 262 remote_session_id = command_elt.getAttribute('sessionid')
263 if remote_session_id: 263 if remote_session_id:
264 session_data['remote_id'] = remote_session_id 264 session_data['remote_id'] = remote_session_id
265 try: 265 data_elt = command_elt.elements(data_form.NS_X_DATA, 'x').next()
266 data_elt = command_elt.elements(data_form.NS_X_DATA, 'x').next()
267 except StopIteration:
268 # FIXME: command answer can contains several 'note' elements
269 try:
270 data_elt = command_elt.elements(NS_COMMANDS, 'note').next()
271 xml_ui = xml_tools.XMLUI('popup', title=data_elt.getAttribute('type'))
272 xml_ui.addText(str(data_elt))
273 return xml_ui
274 except StopIteration:
275 log.error(_('Unmanaged command answer: %s') % command_elt.toXml())
276 return None
277 if session_id is None: 266 if session_id is None:
278 return xml_tools.dataFormResult2XMLUI(data_elt) 267 return xml_tools.dataFormResult2XMLUI(data_elt)
279 form = data_form.Form.fromElement(data_elt) 268 form = data_form.Form.fromElement(data_elt)
280 return xml_tools.dataForm2XMLUI(form, self.__requesting_id, session_id=session_id) 269 return xml_tools.dataForm2XMLUI(form, self.__requesting_id, session_id=session_id)
281 270