core (xmpp): don't add to history a message if there is no message and no subject.
This commit is contained in:
parent
a93bf01800
commit
ed0312261e
1 changed files with 5 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue