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.
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.