we can now receive the gc subject

This commit is contained in:
Yann Leboulanger 2005-06-07 11:05:58 +00:00
parent efc5bdba68
commit 9a446f3e32
1 changed files with 4 additions and 2 deletions

View File

@ -198,8 +198,6 @@ class Connection:
def _messageCB(self, con, msg):
"""Called when we receive a message"""
msgtxt = msg.getBody()
if not msg.getTag('body'): #no <body>
return
mtype = msg.getType()
tim = msg.getTimestamp()
tim = time.strptime(tim, '%Y%m%dT%H:%M:%S')
@ -230,9 +228,13 @@ class Connection:
if subject:
self.dispatch('GC_SUBJECT', (str(msg.getFrom()), subject))
else:
if not msg.getTag('body'): #no <body>
return
self.dispatch('GC_MSG', (str(msg.getFrom()), msgtxt, tim))
gajim.logger.write('gc', msgtxt, str(msg.getFrom()), tim = tim)
else:
if not msg.getTag('body'): #no <body>
return
gajim.logger.write('incoming', msgtxt, str(msg.getFrom()), tim = tim)
self.dispatch('MSG', (str(msg.getFrom()), msgtxt, tim, encrypted))
# END messageCB