From 12bcb9235f6616e421b3c28d3f8b820ad9fe75a3 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 12 Aug 2011 21:24:28 +0200 Subject: Display the JID of an error sender. Fixes #2218. --- src/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core.py b/src/core.py index e159029a..242b22a6 100644 --- a/src/core.py +++ b/src/core.py @@ -873,6 +873,7 @@ class Core(object): Takes a stanza of the form and return a well formed string containing the error informations """ + sender = stanza.attrib['from'] msg = stanza['error']['type'] condition = stanza['error']['condition'] code = stanza['error']['code'] @@ -883,9 +884,9 @@ class Core(object): else: body = condition or _('Unknown error') if code: - message = _('Error: %(code)s - %(msg)s: %(body)s') % {'msg':msg, 'body':body, 'code':code} + message = _('%(from)s: %(code)s - %(msg)s: %(body)s') % {'from':sender, 'msg':msg, 'body':body, 'code':code} else: - message = _('Error: %(msg)s: %(body)s') % {'msg':msg, 'body':body} + message = _('%(from)s: %(msg)s: %(body)s') % {'from':sender, 'msg':msg, 'body':body} return message def room_error(self, error, room_name): -- cgit v1.2.3