diff --git a/src/jcl/jabber/component.py b/src/jcl/jabber/component.py index 5c8197a..998fa18 100644 --- a/src/jcl/jabber/component.py +++ b/src/jcl/jabber/component.py @@ -253,7 +253,7 @@ class JCLComponent(Component, object): disco_info.add_feature("jabber:iq:version") if len(self.account_classes) == 1: disco_info.add_feature("jabber:iq:register") - DiscoIdentity(disco_info, self.disco_identity.name, + DiscoIdentity(disco_info, self.name, self.disco_identity.category, self.disco_identity.type) return disco_info diff --git a/tests/jcl/jabber/test_component.py b/tests/jcl/jabber/test_component.py index 16f3a20..23eb651 100644 --- a/tests/jcl/jabber/test_component.py +++ b/tests/jcl/jabber/test_component.py @@ -353,12 +353,14 @@ class JCLComponent_TestCase(unittest.TestCase): ########################################################################### def test_disco_get_info(self): disco_info = self.comp.disco_get_info(None, None) + self.assertEquals(disco_info.get_identities()[0].get_name(), self.comp.name) self.assertTrue(disco_info.has_feature("jabber:iq:version")) self.assertTrue(disco_info.has_feature("jabber:iq:register")) def test_disco_get_info_multiple_account_type(self): self.comp.account_classes = [ExampleAccount, Example2Account] disco_info = self.comp.disco_get_info(None, None) + self.assertEquals(disco_info.get_identities()[0].get_name(), self.comp.name) self.assertTrue(disco_info.has_feature("jabber:iq:version")) self.assertFalse(disco_info.has_feature("jabber:iq:register"))