Add iq:gateway workaround for Psi
darcs-hash:20070618183846-86b55-4ae671711d7d25d207539906b6f53d0863adf914.gz
This commit is contained in:
@@ -317,6 +317,8 @@ class JCLComponent(Component, object):
|
||||
info_query = info_query.make_result_response()
|
||||
query = info_query.new_query("jabber:iq:gateway")
|
||||
query.newTextChild(query.ns(), "jid", jid)
|
||||
# XEP-0100 - section 6: should be <jid> but PSI only work with <prompt>
|
||||
query.newTextChild(query.ns(), "prompt", jid)
|
||||
self.stream.send(info_query)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@ class JCLComponent_TestCase(unittest.TestCase):
|
||||
self.assertEquals(len(self.comp.stream.sent), 1)
|
||||
iq_sent = self.comp.stream.sent[0]
|
||||
self.assertEquals(iq_sent.get_to(), "user1@test.com")
|
||||
self.assertEquals(len(iq_sent.xpath_eval("*/*")), 1)
|
||||
self.assertEquals(len(iq_sent.xpath_eval("*/*")), 2)
|
||||
jid_nodes = iq_sent.xpath_eval("jig:query/jig:jid",
|
||||
{"jig" : "jabber:iq:gateway"})
|
||||
self.assertEquals(len(jid_nodes), 1)
|
||||
|
||||
Reference in New Issue
Block a user