diff src/core/sat_main.py @ 427:bb0236633da5

core: outgoing groupchat message are not added to history anymore
author Goffi <goffi@goffi.org>
date Fri, 11 Nov 2011 18:40:23 +0100
parents e4e9187e3b5b
children d7e5df876a04
line wrap: on
line diff
--- a/src/core/sat_main.py	Tue Nov 08 22:21:58 2011 +0100
+++ b/src/core/sat_main.py	Fri Nov 11 18:40:23 2011 +0100
@@ -438,8 +438,9 @@
             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