Following the initial group message, I'm experiencing an issue with the strophe.muc plugin not responding to subsequent messages. Although I receive the first presence, message, and roster from the room, any additional messages and presence stanzas do not trigger the functions as expected. It seems like there may be a problem with the following lines:
this.rooms[room].addHandler('message', msg_handler_cb);
this.rooms[room].addHandler('presence', pres_handler_cb);
this.rooms[room].addHandler('roster', roster_cb);
Here is a snippet of my code:
join: function(){
console.log("joining room");
var self = this;
connection.muc.join("<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9ceef3f3f1dcfff3f2faf9eef9f2fff9b2eff9eeeaf9ee">[email protected]</a>", "john", self.onMessage, self.onPresence, self.onRoster);
},
onMessage: function(message){
var self = this;
var body = $(message).text();
var from = $(message).attr("from");
console.log(body);
console.log(from);
},
onPresence: function(presence){
console.log("onPresence");
console.log(presence);
},
onRoster: function(roster){
console.log("onRoster");
console.log(roster);
},