comparison sat/plugins/plugin_xep_0045.py @ 2613:9680cd958529

plugin XEP-0045: fixed crash when muc service is not found
author Goffi <goffi@goffi.org>
date Thu, 21 Jun 2018 01:21:44 +0200
parents f8e4d855001e
children d715d912afac
comparison
equal deleted inserted replaced
2612:3e4e78de9cca 2613:9680cd958529
360 # FIXME: 360 # FIXME:
361 # This ugly hack is here to avoid an issue with openfire: the IRC gateway 361 # This ugly hack is here to avoid an issue with openfire: the IRC gateway
362 # use "conference/text" identity (instead of "conference/irc") 362 # use "conference/text" identity (instead of "conference/irc")
363 muc_service = service 363 muc_service = service
364 break 364 break
365 else:
366 muc_service = None
365 defer.returnValue(muc_service) 367 defer.returnValue(muc_service)
366 368
367 def _getUniqueName(self, muc_service="", profile_key=C.PROF_KEY_NONE): 369 def _getUniqueName(self, muc_service="", profile_key=C.PROF_KEY_NONE):
368 client = self.host.getClient(profile_key) 370 client = self.host.getClient(profile_key)
369 return self.getUniqueName(client, muc_service or None).full() 371 return self.getUniqueName(client, muc_service or None).full()