Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0033.py @ 1552:e0bde0d0b321
core (disco): use of “profile” instead of “profile_key” in several disco methods
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 02 Nov 2015 22:02:41 +0100 |
parents | 3265a2639182 |
children | d17772b0fe22 |
comparison
equal
deleted
inserted
replaced
1551:591c32dbfb0b | 1552:e0bde0d0b321 |
---|---|
97 element.addChild(domish.Element((None, 'address'), None, {'type': type_, 'jid': jid_})) | 97 element.addChild(domish.Element((None, 'address'), None, {'type': type_, 'jid': jid_})) |
98 # when the prosody plugin is completed, we can immediately return mess_data from here | 98 # when the prosody plugin is completed, we can immediately return mess_data from here |
99 self.sendAndStoreMessage(mess_data, entries, profile) | 99 self.sendAndStoreMessage(mess_data, entries, profile) |
100 log.debug("XEP-0033 took over") | 100 log.debug("XEP-0033 took over") |
101 raise failure.Failure(exceptions.CancelError()) | 101 raise failure.Failure(exceptions.CancelError()) |
102 d = self.host.findFeaturesSet([NS_ADDRESS], profile_key=profile) | 102 d = self.host.findFeaturesSet([NS_ADDRESS], profile=profile) |
103 d.addCallbacks(discoCallback, lambda dummy: discoCallback(None)) | 103 d.addCallbacks(discoCallback, lambda dummy: discoCallback(None)) |
104 return d | 104 return d |
105 | 105 |
106 post_xml_treatments.addCallback(treatment) | 106 post_xml_treatments.addCallback(treatment) |
107 return True | 107 return True |
152 timestamp = time() | 152 timestamp = time() |
153 self.internal_data[timestamp] = [] | 153 self.internal_data[timestamp] = [] |
154 defer_list = [] | 154 defer_list = [] |
155 for type_, jid_ in entries: | 155 for type_, jid_ in entries: |
156 d = defer.Deferred() | 156 d = defer.Deferred() |
157 d.addCallback(self.host.findFeaturesSet, jid_=JID(JID(jid_).host), profile_key=profile) | 157 d.addCallback(self.host.findFeaturesSet, jid_=JID(JID(jid_).host), profile=profile) |
158 d.addCallbacks(discoCallback, errback, callbackArgs=[jid_], errbackArgs=[jid_]) | 158 d.addCallbacks(discoCallback, errback, callbackArgs=[jid_], errbackArgs=[jid_]) |
159 d.callback([NS_ADDRESS]) | 159 d.callback([NS_ADDRESS]) |
160 defer_list.append(d) | 160 defer_list.append(d) |
161 d = defer.Deferred().addCallback(lambda dummy: self.internal_data.pop(timestamp)) | 161 d = defer.Deferred().addCallback(lambda dummy: self.internal_data.pop(timestamp)) |
162 defer.DeferredList(defer_list).chainDeferred(d) | 162 defer.DeferredList(defer_list).chainDeferred(d) |