# HG changeset patch # User Goffi # Date 1384347673 -3600 # Node ID ab9620029aa8fa9a59d2f9e0a3df8759bf415d66 # Parent e819630c6737f146ed2e8aea3c835efa5c5856a7 core: dont save anymore messages to database if there is no "message" data (fix empty records with chat states) diff -r e819630c6737 -r ab9620029aa8 src/core/sat_main.py --- a/src/core/sat_main.py Wed Nov 13 14:00:07 2013 +0100 +++ b/src/core/sat_main.py Wed Nov 13 14:01:13 2013 +0100 @@ -533,7 +533,8 @@ if mess_data["type"] != "groupchat": # we don't add groupchat message to history, as we get them back # and they will be added then - self.memory.addToHistory(current_jid, mess_data['to'], + if mess_data['message']: # we need a message to save something + self.memory.addToHistory(current_jid, mess_data['to'], unicode(mess_data["message"]), unicode(mess_data["type"]), mess_data['extra'],