From bbca2284ac7dd8715a695869e0b059450595204e Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 28 Oct 2013 12:02:05 +0100 Subject: [PATCH] fix logging sent single messages. Fixes #7207 --- src/common/connection.py | 2 ++ src/common/connection_handlers_events.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/connection.py b/src/common/connection.py index f52f24aee..ab627f9a5 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -2042,6 +2042,8 @@ class Connection(CommonConnection, ConnectionHandlers): return if isinstance(jid, list): for j in jid: + if session is None: + session = self.get_or_create_session(j, '') self.log_message(j, msg, forward_from, session, original_message, subject, type_, xhtml) else: diff --git a/src/common/connection_handlers_events.py b/src/common/connection_handlers_events.py index a8c0b5206..4f4d4353f 100644 --- a/src/common/connection_handlers_events.py +++ b/src/common/connection_handlers_events.py @@ -2468,7 +2468,7 @@ class MessageOutgoingEvent(nec.NetworkOutgoingEvent): self.session = None self.forward_from = None self.form_node = None - self.original_message = '' + self.original_message = None self.delayed = None self.callback = None self.callback_args = []