Hampel Előd
Hampel Előd

Reputation: 435

Strophe MUC invite decline handler not triggered

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="[email protected]" to="[email protected]">
      <x xmlns="http://jabber.org/protocol/muc#user">
         <decline from="[email protected]">
            <reason>Busy!</reason>
         </decline>
      </x>
   </message>
</body>

Upvotes: 0

Views: 706

Answers (1)

Mark S
Mark S

Reputation: 869

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.

Upvotes: 1

Related Questions