comparison 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
comparison
equal deleted inserted replaced
426:ae446194c20c 427:bb0236633da5
436 message["type"] = type 436 message["type"] = type
437 if subject: 437 if subject:
438 message.addElement("subject", "jabber:client", subject) 438 message.addElement("subject", "jabber:client", subject)
439 message.addElement("body", "jabber:client", msg) 439 message.addElement("body", "jabber:client", msg)
440 self.profiles[profile].xmlstream.send(message) 440 self.profiles[profile].xmlstream.send(message)
441 self.memory.addToHistory(current_jid, jid.JID(to), unicode(msg), profile=profile)
442 if type!="groupchat": 441 if type!="groupchat":
442 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
443 #and they will we added then
443 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 444 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
444 445
445 446
446 def setPresence(self, to="", show="", priority = 0, statuses={}, profile_key='@DEFAULT@'): 447 def setPresence(self, to="", show="", priority = 0, statuses={}, profile_key='@DEFAULT@'):
447 """Send our presence information""" 448 """Send our presence information"""