strophe / strophejs-plugin-stream-management

4 stars 21 forks source link

The xmlOutput doesn't work. #3

Closed sinanergin closed 6 years ago

sinanergin commented 6 years ago

xmlOutput function has an error. The function doesn't catch the iq, presence, message elements. It has to look at root xml tag, but the function looks to child element. Here is sample code block:

var stropheMsg = $msg({ to: toJID, from: connection.jid, type: "chat", id: messageId }).c("body", { xmlns: Strophe.NS.CLIENT }) .t(textIMMessage); connection.streamManagement.addAcknowledgedStanzaListener(function (messageId) { var toProcessId= messageId; }); connection.send(stropheMsg); connection.streamManagement.requestAcknowledgement();

when after callback, you can process via toProcessId.

sinanergin commented 6 years ago

The xmlOutput doesn't work. I fixed related block.