Fix 'treat_incoming_messages' option. (didn’t get messages from the room)

This commit is contained in:
Denis Fomin 2010-12-11 20:51:34 +03:00
parent 2653c160f2
commit a94a7c9832
2 changed files with 3 additions and 4 deletions

View File

@ -1091,10 +1091,6 @@ class DecryptedMessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
# XEP-0172 User Nickname # XEP-0172 User Nickname
self.user_nick = self.stanza.getTagData('nick') or '' 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() self.get_chatstate()
return True return True

View File

@ -97,6 +97,9 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
common.logger.LOG_DB_PATH common.logger.LOG_DB_PATH
self.conn.dispatch('ERROR', (pritext, sectext)) self.conn.dispatch('ERROR', (pritext, sectext))
treat_as = gajim.config.get('treat_incoming_messages')
if treat_as:
obj.mtype = treat_as
pm = False pm = False
if obj.gc_control and obj.resource: if obj.gc_control and obj.resource:
# It's a Private message # It's a Private message