Mercurial > libervia-backend
diff src/core/sat_main.py @ 700:ab9620029aa8
core: dont save anymore messages to database if there is no "message" data (fix empty records with chat states)
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 13 Nov 2013 14:01:13 +0100 |
parents | d731ae066158 |
children | c1cd6c0c2c38 |
line wrap: on
line diff
--- 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'],