Dirk Meyer wrote:
> Peter Saint-Andre wrote:
>> Alban Crequy wrote:
>>> I implemented an automatic caps lookup via disco in telepathy-salut
>>> (the XEP-0174 implementation in the Telepathy framework). It opens a
>>> stream only if a "ver" TXT record is advertised *and* if the "ver"
>>> record is not already known.
>> Right, I see the need for that. But it's unfortunate.
>>
>> Still thinking...
> 
> Maybe it is a bad idea, maybe not. We could provide a query TCP
> feature. So if you do not know the client, you open a connection and get
> the follwoing features: starttls (for real communication) and query to
> get the disco#query results and close the stream after that. 

Or in serverless mode you could automatically return the disco#info in
the response, like so:

<stream:stream
        xmlns='jabber:client'
        xmlns:stream='http://etherx.jabber.org/streams'
        from='[EMAIL PROTECTED]'
        to='[EMAIL PROTECTED]'
        version='1.0'>
<stream:features>
  <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  <query xmlns='http://jabber.org/protocol/disco#info'
         node='some-node-here'>
    <identity category='client' type='pc'/>
    <feature var='http://jabber.org/protocol/disco#info'/>
    <feature var='http://jabber.org/protocol/disco#items'/>
    <feature var='http://jabber.org/protocol/muc'/>
  </query>
</stream:features>

But that doesn't solve the problem of prompting the user when someone
wants to open a stream (however, the interface could prompt the user
only if the contact goes beyond the disco stage).

> Or we use a
> second port just for the query. Connect to that port and you get a
> stream with just the query results and the socket is closed again.

I like that less well, but I'm not sure why.

Peter

-- 
Peter Saint-Andre
https://stpeter.im/


Reply via email to