Don't log room description at each gc connection
This commit is contained in:
		
							parent
							
								
									a3827fe5d0
								
							
						
					
					
						commit
						30f1a15efb
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -1663,7 +1663,11 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
 | 
				
			||||||
				self.dispatch('GC_MSG', (frm, msgtxt, tim, has_timestamp, msghtml,
 | 
									self.dispatch('GC_MSG', (frm, msgtxt, tim, has_timestamp, msghtml,
 | 
				
			||||||
					statusCode))
 | 
										statusCode))
 | 
				
			||||||
				if self.name not in no_log_for and jid not in no_log_for and not \
 | 
									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:
 | 
										try:
 | 
				
			||||||
						gajim.logger.write('gc_msg', frm, msgtxt, tim = tim)
 | 
											gajim.logger.write('gc_msg', frm, msgtxt, tim = tim)
 | 
				
			||||||
					except exceptions.PysqliteOperationalError, e:
 | 
										except exceptions.PysqliteOperationalError, e:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue