-
berry@xeprtc.antillia.io
Hello everyone
-
Lance
hiya
-
berry@xeprtc.antillia.io
Is "connected" Event still working ? I was unable to listen to it, I might use auth:success instead
-
Lance
should be, i dont remember changing anything related to it
-
Lance
but session:started is generally the event you want to use
-
Flavius Andrei
hi! how do i send a simple stanza like this?
-
Flavius Andrei
<iq id='1' to='domain.tld' type='get'>
<services xmlns='urn:xmpp:extdisco:2'/>
</iq>
-
Flavius Andrei
hey, Lance
-
Flavius Andrei
can you please help me a bit?
-
Flavius Andrei
i have no idea how to write a stanza like this :)
-
Flavius Andrei
<iq id='1' to='domain.tld' type='get'>
<services xmlns='urn:xmpp:extdisco:2'/ <xmpp:extdisco:2'/>>
</iq>
-
Lance
hiya
-
Lance
yeah
-
Lance
client.getServices is what you want there
-
Lance
getServices('server-jid', undefined, '2') will get the full services list using the :2 namespace
-
Flavius Andrei
this.client.sendIQ({
externalServices: {
},
to: 'domain.tld',
type: 'get'
}).then((r) => console.log('services', r));
-
Flavius Andrei
this uses extdisco:1 but i'm interested in extdisco:2
-
Lance
add version: '2' to that externalServices section and that'll use the :2 version
-
Flavius Andrei
i've tried the version as the third parameter already but it still uses 1 in the xmlns
-
Lance
what stanza version are you running?
-
Flavius Andrei
this.client.getServices('domain.tld', undefined, '2').then((r) => console.log('SERVICES', r));
-
Flavius Andrei
returns
-
Flavius Andrei
<iq xmlns="jabber:client" id="b2862c5b-2cdb-4aa1-aba3-c508069b9199" to="domain.tld" type="get"><services xmlns="urn:xmpp:extdisco:1"/></iq> out>>
-
Flavius Andrei
latest version
-
Flavius Andrei
well, i've built id couple of weeks ago from the repo
-
Flavius Andrei
built it*
-
Lance
that support was recent, trying to find when it was added
-
Lance
no, that was back in May
-
Lance
its supposed to use :2 by default now
-
Flavius Andrei
i didn't see xep-0215 in your list of supported protocols so i imagined you didn't implement it
-
Flavius Andrei
well, it's not :)
-
Lance
just double checking, using stanza 12.14.6 then?
-
Lance
getting local test page fired up to test this
-
Flavius Andrei
changelog says 12.0.0
-
Lance
12.9.0 is when :2 was set as default
-
Flavius Andrei
i don't remember exactly when i built it, if you have a place where i can check the version...
-
Lance
the main export for stanza has a VERSION field
-
Flavius Andrei
got 12.10 now, i'll build it in a sec
-
Flavius Andrei
is there a doc somewhere describing how to write a stanza? :)
-
Flavius Andrei
because i never knew how to do that
-
Flavius Andrei
even a simple one boggles me
-
Flavius Andrei
yeah, 12.10 did it
-
Flavius Andrei
thanks!
-
Flavius Andrei
how about this.client.discoverICEServers().then((r) => console.log('ICE', r));?
-
Flavius Andrei
it never returns any servers for me…
-
Lance
looking
-
Lance
aha, that's a bug
-
Lance
the point of that function is to seed the ice server config for the jingle plugin, and it does do that
-
Lance
but its just returning an empty list in the end
-
Lance
but the only difference between that function getServices is that it updates the jingle config
-
Flavius Andrei
i see
-
Flavius Andrei
well, thanks for all the help
-
Flavius Andrei
have a nice week-end!
-
Lance
you too!