-
dwd
> XMPP doesn't really have a separate concept of a "conversation" Well, there is the thread identifier, but I'm not sure anyone really uses that. ↺
-
Menel
Cheogram uses that, and... Movim maybe?
-
Zash
Still, what is a "conversation"?
-
dwd
See XEP-0201?
-
dwd
(One I'd forgotten existed, I was typing a message saying that nobody knows what a conversation/thread is in semantic terms, but thought I really ought to check)
-
edhelas
I'm currently working on stream renegociation in Jingle / WebRTC to allow the add/removal of new video/audio tracks.
-
edhelas
https://blog.mozilla.org/webrtc/perfect-negotiation-in-webrtc/
-
edhelas
I saw that it was specified in Jingle here https://xmpp.org/extensions/xep-0166.html#def-action-content-add But it seems that the latest WebRTC browser implementation are doing it directly without the 3rd party signalisation channel.
-
edhelas
What are your tough on this ?
-
seil
For some reason iqCaller (xmppjs) does not return anything and I have to handle everything through events (e.g. I create a trigger function which sends out a command to the server, then I just handle everything in the stanza event) is this intentional design or something I'm doing wrong?
-
seil
`await client.iqCaller.set(query).catch(console.error);`
-
Zash
https://github.com/xmppjs/xmpp.js/tree/main/packages/iq#get looks to me as it should be returning something. They don't have the `.catch()` in the examples tho not sure if that would really change anything for successful responses.
-
Zash
Tho the way the .get and .set functions extract the response payload seems to assume that it will always match the request name+xmlns, but I'm not sure that is the case
-
Zash
seil, what is `query` you're trying with?
-
seil
> seil, what is `query` you're trying with? ```js async function syncMessageList(lastMessageId: string) { console.log(lastMessageId); const query = xml( "query", { xmlns: "urn:xmpp:mam:2" }, xml( "x", { xmlns: "jabber:x:data", type: "submit" }, xml( "field", { var: "FORM_TYPE", type: "hidden" }, xml("value", {}, "urn:xmpp:mam:2") ), xml("field", { var: "after" }, xml("value", {}, lastMessageId)) ) ); await client.iqCaller.set(query).catch(console.error); } ``` ↺
-
Zash
Yeah MAM will not work with this code, is there no special MAM query in xmpp.jsq✎ -
Zash
Yeah MAM will not work with this code, is there no special MAM query in xmpp.js? ✏
-
seil
> Yeah MAM will not work with this code, is there no special MAM query in xmpp.js? Not that I know of.. ↺
-
Zash
As I said, .get() and .set() make assumptions that will not always work, especially not with MAM where the results are delivered in message stanzas, not the iq-result
-
seil
So would it be better to just make a .request()?
-
Zash
Yes, + something to catch <message><{urn:xmpp:mam:2}result/>
-
Zash
until you get the iq result
-
seil
I also looked into iqCallee but I don't really understand what it should listen for (client.iqCallee.set("???", (ctx) => {...}))
-
singpolyma
If you're trying to do a lot of stuff like full MAM in JavaScript you may also be interested in snikket SDK, which wraps xmpp.js and adds a lot of high level features like a MAM sync stack and persistence layer
-
singpolyma
> I saw that it was specified in Jingle here https://xmpp.org/extensions/xep-0166.html#def-action-content-add But it seems that the latest WebRTC browser implementation are doing it directly without the 3rd party signalisation channel. edhelas: the link you sent is using a signalling channel. onnegotiationneeded you get the latest SDP and send it. With jingle instead of sending the SDP you want to figure out what changed (something added, removed, etc) and send the right event ↺
-
edhelas
Yes that was my point, the problem is that Conversations is using the Jingle way but WebRTC moved to have a specific channel for that
-
edhelas
Didn't checked how Dino and the others are doing it
-
singpolyma
I'm not sure what problem you mean?
-
edhelas
In an already existing audio-call: When I enable the camera on Conversations I have a content-add in Jingle When I enable the camera on Firefox/Chrome they basically already negociate the thing using their signaling channel
-
singpolyma
They don't have a signalling channel
-
singpolyma
So I'm not sure what you mean