strophe / strophejs

Strophe.js is an XMPP library for JavaScript

Home Page:http://strophe.im/strophejs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught TypeError: (o, strophe_WEBPACK_IMPORT_MODULE_1.$msg) is not a function

vysakhviswanathma opened this issue · comments

Created a chat application with Openfire and reactjs. Connection established with openfire and login users is working expected.But while trying to send message it show error.

sendMessage is triggered when user clicks on send button for sending message.

function sendMessage(message) {
log('CHAT: Send a message to ' + receiver + ': ' + message);

var m = $msg({
    to: receiver,
    from: 'sender@localhost',
    type: 'chat'
}).c("body").t(msg);
connection.send(m);

}

How are you importing or getting hold of $msg?