comparison src/plugins/plugin_xep_0045.py @ 950:5e8e8a034411

plugin XEP-0045: profileConnected return the deferred, so muc service presence is checked before the end of initialisation
author Goffi <goffi@goffi.org>
date Mon, 31 Mar 2014 12:23:13 +0200
parents e1842ebcb2f3
children 301b342c697a
comparison
equal deleted inserted replaced
949:b4cd968e30fb 950:5e8e8a034411
81 81
82 def profileConnected(self, profile): 82 def profileConnected(self, profile):
83 def assign_service(service): 83 def assign_service(service):
84 client = self.host.getClient(profile) 84 client = self.host.getClient(profile)
85 client.muc_service = service 85 client.muc_service = service
86 self.getMUCService(profile_key=profile).addCallback(assign_service) 86 return self.getMUCService(profile_key=profile).addCallback(assign_service)
87 87
88 def __check_profile(self, profile): 88 def __check_profile(self, profile):
89 """check if profile is used and connected 89 """check if profile is used and connected
90 90
91 if profile known but disconnected, remove it from known profiles 91 if profile known but disconnected, remove it from known profiles