comparison sat.tac @ 79:db0a0f000e37

Chat presentation enhancement - core: message signal is not sent anymore for groupchat type, cause MUC chat server do it for us - wix: user nick can now be specified to chat windows, usefull for colorization - memory: full jid are now sent - wix: message from user are now in black for group chat
author Goffi <goffi@goffi.org>
date Wed, 31 Mar 2010 19:56:43 +1100
parents f271fff3a713
children 23caf1051099
comparison
equal deleted inserted replaced
78:ace2af8abc5a 79:db0a0f000e37
591 message["from"] = current_jid.full() 591 message["from"] = current_jid.full()
592 message["type"] = type 592 message["type"] = type
593 message.addElement("body", "jabber:client", msg) 593 message.addElement("body", "jabber:client", msg)
594 self.profiles[profile].xmlstream.send(message) 594 self.profiles[profile].xmlstream.send(message)
595 self.memory.addToHistory(current_jid, current_jid, jid.JID(to), message["type"], unicode(msg)) 595 self.memory.addToHistory(current_jid, current_jid, jid.JID(to), message["type"], unicode(msg))
596 self.bridge.newMessage(message['from'], unicode(msg), to=message['to'], type=type, profile=profile) #We send back the message, so all clients are aware of it 596 if type!="groupchat":
597 self.bridge.newMessage(message['from'], unicode(msg), to=message['to'], type=type, profile=profile) #We send back the message, so all clients are aware of it
597 598
598 599
599 def setPresence(self, to="", show="", priority = 0, statuses={}, profile_key='@DEFAULT@'): 600 def setPresence(self, to="", show="", priority = 0, statuses={}, profile_key='@DEFAULT@'):
600 """Send our presence information""" 601 """Send our presence information"""
601 profile = self.memory.getProfileName(profile_key) 602 profile = self.memory.getProfileName(profile_key)