From 96fbd0ae4ffdc7da112ff936daec17b002ddc01c Mon Sep 17 00:00:00 2001 From: Travis Shirk <travis@pobox.com> Date: Sun, 13 Nov 2005 01:48:48 +0000 Subject: [PATCH] JEP 0070 Last Call updates; transaction IDs are a MUST, so we should display them to the user. Closes #1088 --- src/common/connection.py | 7 +++++-- src/dialogs.py | 1 + src/gajim.py | 7 ++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index eef23d3dd3..e96e3dd01a 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -5,6 +5,7 @@ ## - Vincent Hanquez <tab@snarc.org> ## - Nikos Kouremenos <nkour@jabber.org> ## - Dimitur Kirov <dkirov@gmail.com> +## - Travis Shirk <travis@pobox.com> ## ## Copyright (C) 2003-2005 Gajim Team ## @@ -1353,9 +1354,10 @@ class Connection: if opt in ('yes', 'no'): self.build_http_auth_answer(iq_obj, opt) else: + id = iq_obj.getTagAttr('confirm', 'id') method = iq_obj.getTagAttr('confirm', 'method') url = iq_obj.getTagAttr('confirm', 'url') - self.dispatch('HTTP_AUTH', (method, url, iq_obj)); + self.dispatch('HTTP_AUTH', (method, url, id, iq_obj)); raise common.xmpp.NodeProcessed def _ErrorCB(self, con, iq_obj): @@ -1837,7 +1839,8 @@ class Connection: msg_iq.setTag(common.xmpp.NS_ENCRYPTED + ' x').setData(msgenc) # chatstates - if peer supports jep85, send chatstates - # please note that the only valid tag inside a message containing a <body> tag is the active event + # please note that the only valid tag inside a message containing a <body> + # tag is the active event if chatstate is not None: msg_iq.setTag(chatstate, {}, namespace = 'http://jabber.org/protocol/chatstates') diff --git a/src/dialogs.py b/src/dialogs.py index cc21ee7b2e..84e08a021f 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -439,6 +439,7 @@ class AboutDialog: 'Vincent Hanquez <tab@snarc.org>', 'Nikos Kouremenos <kourem@gmail.com>', 'Dimitur Kirov <dkirov@gmail.com>', + 'Travis Shirk <travis@pobox.com>', 'Gajim patchers' ] diff --git a/src/gajim.py b/src/gajim.py index 6782b46475..ab91e35ab7 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -9,6 +9,7 @@ exec python -OOt "$0" ${1+"$@"} ## - Vincent Hanquez <tab@snarc.org> ## - Nikos Kouremenos <kourem@gmail.com> ## - Dimitur Kirov <dkirov@gmail.com> +## - Travis Shirk <travis@pobox.com> ## ## Copyright (C) 2003-2005 Gajim Team ## @@ -192,9 +193,9 @@ class Interface: room_jid) def handle_event_http_auth(self, account, data): - #('HTTP_AUTH', account, (method, url, iq_obj)) - dialog = dialogs.ConfirmationDialog(_('HTTP (%s) Authorization for %s') \ - % (data[0], data[1]), _('Do you accept this request?')) + #('HTTP_AUTH', account, (method, url, transaction_id, iq_obj)) + dialog = dialogs.ConfirmationDialog(_('HTTP (%s) Authorization for %s (id: %s)') \ + % (data[0], data[1], data[2]), _('Do you accept this request?')) if dialog.get_response() == gtk.RESPONSE_OK: answer = 'yes' else: -- GitLab