From a94a7c983274e96ff45ea91ee725c975997848a4 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Sat, 11 Dec 2010 20:51:34 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20'treat=5Fincoming=5Fmessages'=20option.?= =?UTF-8?q?=20(didn=E2=80=99t=20get=20messages=20from=20the=20room)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/connection_handlers_events.py | 4 ---- src/session.py | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/connection_handlers_events.py b/src/common/connection_handlers_events.py index ebf043b18..95e2176b5 100644 --- a/src/common/connection_handlers_events.py +++ b/src/common/connection_handlers_events.py @@ -1091,10 +1091,6 @@ class DecryptedMessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent): # XEP-0172 User Nickname self.user_nick = self.stanza.getTagData('nick') or '' - treat_as = gajim.config.get('treat_incoming_messages') - if treat_as: - self.mtype = treat_as - self.get_chatstate() return True diff --git a/src/session.py b/src/session.py index e50d61f84..3068f5b7a 100644 --- a/src/session.py +++ b/src/session.py @@ -97,6 +97,9 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession): common.logger.LOG_DB_PATH self.conn.dispatch('ERROR', (pritext, sectext)) + treat_as = gajim.config.get('treat_incoming_messages') + if treat_as: + obj.mtype = treat_as pm = False if obj.gc_control and obj.resource: # It's a Private message