Mercurial > libervia-backend
changeset 2751:286a32a187e7
core (xmpp): don't add to history a message if there is no message and no subject.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 04 Jan 2019 18:44:43 +0100 (2019-01-04) |
parents | ae495f27b316 |
children | 1fa615faec8b |
files | sat/core/xmpp.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/core/xmpp.py Fri Jan 04 11:14:53 2019 +0100 +++ b/sat/core/xmpp.py Fri Jan 04 18:44:43 2019 +0100 @@ -970,7 +970,11 @@ log.info(u"history is skipped as requested") data[u"extra"][u"history"] = C.HISTORY_SKIP else: - return self.host.memory.addToHistory(self.parent, data) + if data[u"message"] or data[u"subject"]: # we need a message to store + return self.host.memory.addToHistory(self.parent, data) + else: + log.debug(u"not storing empty message to history: {data}" + .format(data=data)) def bridgeSignal(self, __, data): try: