diff options
-rw-r--r-- | src/common/connection_handlers_events.py | 4 | ||||
-rw-r--r-- | 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 |