backend, bridge: asynchronous history
quick_frontend: use of asynchronous history
This commit is contained in:
parent
88d0fceb2a
commit
f1966d9692
2 changed files with 94 additions and 79 deletions
|
|
@ -438,7 +438,7 @@ 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, current_jid, jid.JID(to), message["type"], unicode(msg))
|
||||
self.memory.addToHistory(current_jid, jid.JID(to), unicode(msg), profile=profile)
|
||||
if type!="groupchat":
|
||||
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
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ class SatMessageProtocol(xmppim.MessageProtocol):
|
|||
if e.name == "body":
|
||||
mess_type = message['type'] if message.hasAttribute('type') else 'normal'
|
||||
self.host.bridge.newMessage(message["from"], e.children[0], mess_type, message['to'], profile=self.parent.profile)
|
||||
self.host.memory.addToHistory(self.parent.jid, jid.JID(message["from"]), self.parent.jid, "chat", e.children[0])
|
||||
self.host.memory.addToHistory(jid.JID(message["from"]), jid.JID(message["to"]), e.children[0], profile=self.parent.profile)
|
||||
break
|
||||
|
||||
class SatRosterProtocol(xmppim.RosterClientProtocol):
|
||||
|
|
|
|||
Loading…
Reference in a new issue