comparison src/plugins/plugin_xep_0070.py @ 2014:0694a2611bad

plugin XEP-0070: change message popup to be more user-friendly
author Geoffrey POUZET <chteufleur@kingpenguin.tk>
date Tue, 19 Jul 2016 21:25:22 +0200
parents 2afd5bd781ef
children 438a49dbfe87
comparison
equal deleted inserted replaced
2013:b536dd121da1 2014:0694a2611bad
90 auth_method = auth_elt['method'] 90 auth_method = auth_elt['method']
91 auth_url = auth_elt['url'] 91 auth_url = auth_elt['url']
92 self._dictRequest[client] = (auth_id, auth_method, auth_url, stanzaType, elt) 92 self._dictRequest[client] = (auth_id, auth_method, auth_url, stanzaType, elt)
93 93
94 confirm_ui = xml_tools.XMLUI("form", title=D_("Auth confirmation"), submit_id='') 94 confirm_ui = xml_tools.XMLUI("form", title=D_("Auth confirmation"), submit_id='')
95 confirm_ui.addText(D_("HTTP ({}) Authorization for {} (id: {}).".format(auth_method, auth_url, auth_id))) 95 confirm_ui.addText(D_("{} needs to validate your identity, do you agreeĀ ?".format(auth_url)))
96 confirm_ui.addText(D_("Validation code : {}".format(auth_id)))
97 confirm_ui.addText(D_("Please check that this code is the same as on {}".format(auth_url)))
98 confirm_ui.addText("")
96 confirm_ui.addText(D_("Submit to authorize, cancel otherwise.")) 99 confirm_ui.addText(D_("Submit to authorize, cancel otherwise."))
97 d = xml_tools.deferredUI(self.host, confirm_ui, chained=False) 100 d = xml_tools.deferredUI(self.host, confirm_ui, chained=False)
98 d.addCallback(self._authRequestCallback, client.profile) 101 d.addCallback(self._authRequestCallback, client.profile)
99 self.host.actionNew({"xmlui": confirm_ui.toXml()}, profile=client.profile) 102 self.host.actionNew({"xmlui": confirm_ui.toXml()}, profile=client.profile)
100 103