core (disco): use of “profile” instead of “profile_key” in several disco methods

This commit is contained in:
Goffi 2015-11-02 22:02:41 +01:00
commit 341143445b

View file

@ -100,7 +100,7 @@ class XEP_0045(object):
def assign_service(service):
client = self.host.getClient(profile)
client.muc_service = service
return self.getMUCService(profile_key=profile).addCallback(assign_service)
return self.getMUCService(profile=profile).addCallback(assign_service)
def checkClient(self, profile):
"""Check if the profile is connected and has used the MUC feature.
@ -304,14 +304,14 @@ class XEP_0045(object):
return self.clients[profile].rec_subjects.values()
@defer.inlineCallbacks
def getMUCService(self, jid_=None, profile_key=C.PROF_KEY_NONE):
def getMUCService(self, jid_=None, profile=C.PROF_KEY_NONE):
"""Return first found MUC service of an entity
@param jid_: entity which may have a MUC service, or None for our own server
@param profile_key: %(doc_profile_key)s
@param profile: %(doc_profile)s
"""
muc_service = None
services = yield self.host.findServiceEntities("conference", "text", jid_, profile_key=profile_key)
services = yield self.host.findServiceEntities("conference", "text", jid_, profile=profile)
for service in services:
if ".irc." not in service.userhost():
# FIXME: