comparison src/core/sat_main.py @ 425:e4e9187e3b5b

backend, bridge: asynchronous history quick_frontend: use of asynchronous history
author Goffi <goffi@goffi.org>
date Tue, 08 Nov 2011 01:08:11 +0100
parents 6c20c76abdcc
children bb0236633da5
comparison
equal deleted inserted replaced
424:72c13313b6d6 425:e4e9187e3b5b
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, current_jid, jid.JID(to), message["type"], unicode(msg)) 441 self.memory.addToHistory(current_jid, jid.JID(to), unicode(msg), profile=profile)
442 if type!="groupchat": 442 if type!="groupchat":
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 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 444
445 445
446 def setPresence(self, to="", show="", priority = 0, statuses={}, profile_key='@DEFAULT@'): 446 def setPresence(self, to="", show="", priority = 0, statuses={}, profile_key='@DEFAULT@'):