(Sorry for my english) Before i'm using converse js 2.0.4, but now i want update converse js to 3.0.2
I read documentation, but i don't understand how i can write and use my methods for chat.
before i make it easy
converse.listen.on('message', function (event, messageXML) {
if (messageXML.textContent !== "") {
var id = messageXML.attributes.from.value.split('/')[0],
text = messageXML.textContent;
if (scope.chat.partner.jid === id) {
scope.chat.messages.push({
photo: scope.chat.partner.image,
name: scope.chat.partner.fullname,
self: false,
textContent: text
});
}
}
});
But now converse working with plugins. Please tell me how i can make code above in new version for example.