Question

I have a web-chat application with group-chat. Now I can invite other users to my room, I can listen to invitations and I can decline an invitation, but for some reason, when a user declines my invitation, it doesn't trigger my onDecline method. Here's the part where I add the handler:

connection.addHandler(onDecline, Strophe.NS.MUC_USER);

//(Strophe.NS.MUC_USER = http://jabber.org/protocol/muc#user)

I get the following XML when the user declines:

<body xmlns="http://jabber.org/protocol/httpbind">
   <message xmlns="jabber:client" from="qvxuceluy@conference.127.0.0.1" to="hampel.elod_reea.net@127.0.0.1">
      <x xmlns="http://jabber.org/protocol/muc#user">
         <decline from="40756382284@127.0.0.1">
            <reason>Busy!</reason>
         </decline>
      </x>
   </message>
</body>
Était-ce utile?

La solution

Your message handler might be intercepting it. Make sure your message handler has "groupchat" or "chat" for the type (onMessage, null, 'message', 'chat'). Or you can handle it through your message handler.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top