Don't log room description at each gc connection

This commit is contained in:
Jean-Marie Traissard 2008-04-21 00:00:52 +00:00
parent a3827fe5d0
commit 30f1a15efb
1 changed files with 5 additions and 1 deletions

View File

@ -1663,7 +1663,11 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
self.dispatch('GC_MSG', (frm, msgtxt, tim, has_timestamp, msghtml,
statusCode))
if self.name not in no_log_for and jid not in no_log_for and not \
int(float(mktime(tim))) <= self.last_history_line[jid] and msgtxt:
int(float(mktime(tim))) <= self.last_history_line[jid] and msgtxt \
and frm.find('/') >= 0:
# if frm.find('/') < 0, it means message comes from room itself
# usually it hold description and can be send at each connection
# so don't store it in logs
try:
gajim.logger.write('gc_msg', frm, msgtxt, tim = tim)
except exceptions.PysqliteOperationalError, e: