Mercurial > libervia-backend
diff src/core/xmpp.py @ 742:03744d9ebc13
plugin XEP-0033: implementation of the addressing feature:
- frontends pass the recipients in the extra parameter of sendMessage
- backend checks if the target server supports the feature (this is not done yet by prosody plugin)
- features and identities are cached per profile and server
- messages are duplicated in history for now (TODO: redesign the database)
- echos signals are also duplicated to the sender (FIXME)
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 11 Dec 2013 17:16:53 +0100 |
parents | b26dfac8e46c |
children | bfabeedbf32e |
line wrap: on
line diff
--- a/src/core/xmpp.py Fri Dec 13 05:35:24 2013 +0100 +++ b/src/core/xmpp.py Wed Dec 11 17:16:53 2013 +0100 @@ -75,9 +75,10 @@ self.presence.available() - self.disco.requestInfo(jid.JID(self.jid.host)).addCallback(self.host_app.serverDisco, self.profile) # FIXME: use these informations + jid_ = self.getHostJid() + self.disco.requestInfo(jid_).addCallback(self.host_app.serverDisco, jid_, self.profile) # FIXME: use these informations - self.disco.requestItems(jid.JID(self.jid.host)).addCallback(self.host_app.serverDiscoItems, self.disco, self.profile, self.client_initialized) + self.disco.requestItems(jid_).addCallback(self.host_app.serverDiscoItems, self.disco, jid_, self.profile, self.client_initialized) self.conn_deferred.callback(None) def initializationFailed(self, reason): @@ -103,6 +104,10 @@ self.host_app.bridge.disconnected(self.profile) # we send the signal to the clients self.host_app.purgeClient(self.profile) # and we remove references to this client + def getHostJid(self): + """@return: the jid of the local server""" + return jid.JID(self.jid.host) + class SatMessageProtocol(xmppim.MessageProtocol):