Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYann Leboulanger <yann@leboulanger.org>2017-06-14 16:29:19 +0300
committerYann Leboulanger <yann@leboulanger.org>2017-06-14 16:29:19 +0300
commit388acfca5a672a004e205d2c8083ab55bb835a12 (patch)
treebc5700a6766f4e064a7239ecc07e514ce81192a8 /src
parent4f7b72883d3469712bd3171e5edcafcb43ada8e8 (diff)
fix logging single messages. Fixes #8640
Diffstat (limited to 'src')
-rw-r--r--src/common/connection.py10
-rw-r--r--src/common/zeroconf/connection_zeroconf.py2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/common/connection.py b/src/common/connection.py
index f498116ff..4fb178eec 100644
--- a/src/common/connection.py
+++ b/src/common/connection.py
@@ -413,14 +413,14 @@ class CommonConnection:
gajim.nec.push_incoming_event(
StanzaMessageOutgoingEvent(None, **vars(obj)))
- def log_message(self, obj):
+ def log_message(self, obj, jid):
if not obj.is_loggable:
return
if obj.forward_from or not obj.session or not obj.session.is_loggable():
return
- if not gajim.config.should_log(self.name, obj.jid):
+ if not gajim.config.should_log(self.name, jid):
return
if obj.xhtml and gajim.config.get('log_xhtml_messages'):
@@ -437,7 +437,7 @@ class CommonConnection:
kind = 'single_msg_sent'
gajim.logger.write(
- kind, obj.jid, message, subject=obj.subject,
+ kind, jid, message, subject=obj.subject,
additional_data=obj.additional_data)
def ack_subscribed(self, jid):
@@ -2058,9 +2058,9 @@ class Connection(CommonConnection, ConnectionHandlers):
for j in obj.jid:
if obj.session is None:
obj.session = self.get_or_create_session(j, '')
- self.log_message(obj)
+ self.log_message(obj, j)
else:
- self.log_message(obj)
+ self.log_message(obj, obj.jid)
def send_contacts(self, contacts, fjid, type_='message'):
"""
diff --git a/src/common/zeroconf/connection_zeroconf.py b/src/common/zeroconf/connection_zeroconf.py
index 27fb610d1..2446a5e37 100644
--- a/src/common/zeroconf/connection_zeroconf.py
+++ b/src/common/zeroconf/connection_zeroconf.py
@@ -342,7 +342,7 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
if obj.callback:
obj.callback(obj.msg_iq, *obj.callback_args)
- self.log_message(obj)
+ self.log_message(obj, obj.jid)
def on_send_not_ok(reason):
reason += ' ' + _('Your message could not be sent.')