Domanda

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>
È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top