Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8768389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:03:12+00:00 2026-06-13T17:03:12+00:00

After the first group message the strophe.muc plugin doesn’t react on the following messages.

  • 0

After the first group message the strophe.muc plugin doesn’t react on the following messages.
I get the first presence, message and roster from the room, but all subsequent messages and presence stanzas will not trigger the functions.
I think there is something wrong with the lines:

this.rooms[room].addHandler('message', msg_handler_cb);
this.rooms[room].addHandler('presence', pres_handler_cb);
this.rooms[room].addHandler('roster', roster_cb);

my code:

    join: function(){
          console.log("joining room");
          var self = this;
          connection.muc.join("room@conference.server", "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);
      },
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:03:13+00:00Added an answer on June 13, 2026 at 5:03 pm

    Handlers that wish to continue being invoked should return true.

    So just append return true; to all your handlers.

    It’s mentioned in the docs:
    http://strophe.im/strophejs/doc/1.0.2/files2/strophe-js.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to extract word after first 'from' in the following string- anti-CD24 from
js doesn't work if I don't refresh the page after first load,and div's background-img
Since C# doesn't have a before,after,last,first etc. as part of its foreach. The challenge
i get the following when i click update after unchecking the full time box.
after first deploy with set :deploy_via, :copy for make changes in app now I'm
oo design basics here... Edit: To clarify after first answer - I'm not asking
After the first launch of my app i want to show the user a
Is the idea after the first resolution it'll rely on OS caching? Still this
I installed LispCabinet and after the first start it tells me: server-ensure-safe-dir: The directory
How do I retrieve all elements after the first one not starting with a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.