core: outgoing groupchat message are not added to history anymore

This commit is contained in:
Goffi 2011-11-11 18:40:23 +01:00
commit 4c4f590898

View file

@ -438,8 +438,9 @@ class SAT(service.Service):
message.addElement("subject", "jabber:client", subject)
message.addElement("body", "jabber:client", msg)
self.profiles[profile].xmlstream.send(message)
self.memory.addToHistory(current_jid, jid.JID(to), unicode(msg), profile=profile)
if type!="groupchat":
self.memory.addToHistory(current_jid, jid.JID(to), unicode(msg), profile=profile) #we don't add groupchat message to history, as we get them back
#and they will we added then
self.bridge.newMessage(message['from'], unicode(msg), mess_type=type, to_jid=message['to'], profile=profile) #We send back the message, so all clients are aware of it