core (xmpp): don't add to history a message if there is no message and no subject.

This commit is contained in:
Goffi 2019-01-04 18:44:43 +01:00
commit ed0312261e

View file

@ -970,7 +970,11 @@ class SatMessageProtocol(xmppim.MessageProtocol):
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: