Not logged in. · Lost password · Register
Forum: MatriX RSS
responding to group IM invite
Avatar
dtjoa #1
Member since Jul 2012 · 39 posts
Group memberships: Members
Show profile · Link to this post
Subject: mucmanager
What do I need to do to accept group IM invite? Calling EnterRoom() does not seem to put me to the Group IM. Is there additional step I need to do?
Also, what happen if I want to reject the invitation? Is there any API I can call from MucManager class?
Avatar
dtjoa #2
Member since Jul 2012 · 39 posts
Group memberships: Members
Show profile · Link to this post
OK. I found my problem when accepting the invite. I not setting the room ID properly.

How do I send Decline response to invite? Do I need to construct the message manually?
Avatar
Alex #3
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Use this code to decline an invite:

  1. public void DeclineInvite(Jid to, Jid room, string reason)
  2. {
  3.     var user = new UserX();
  4.     var decline = new Decline {To = to};
  5.  
  6.     if (reason != null)
  7.         user.Decline.Reason = reason;
  8.  
  9.     user.Decline = decline;
  10.  
  11.     var msg = new Message { To = room };
  12.     msg.Add(user);
  13. }

I upload new builds tomorrow where this is included and also a OnDeclineInvite event for the MucManager.

Alex
Avatar
dtjoa #4
Member since Jul 2012 · 39 posts
Group memberships: Members
Show profile · Link to this post
Thank you for the quick response.

I am able to send decline now.
By the way, I can't find UserX class, but I replace it with Matrix.Xmpp.Muc.User.X class.

I'll try the new build tomorrow.
Avatar
Alex #5
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
thats correct, I have the following in my codes which I forgot to post:

  1. using UserX = Matrix.Xmpp.Muc.User.X;
Avatar
dtjoa #6
Member since Jul 2012 · 39 posts
Group memberships: Members
Show profile · Link to this post
Alex,

I tested the new build (1.5.0.3). Found these issues:
   - Invite message trigger both OnInvite event and OnDeclineInvite event, shouldn't it trigger only OnInvite?
   - Calling method DeclineInvite(To, From, Reason) - throw null exception (object reference not set to an instance of an object)
   - Calling method DeclineInvite(To, From) - does not send out the decline message
   - Decline invite message trigger both OnInvite event and OnDeclineInvite event, shouldn't it trigger only OnDeclineInvite?
Avatar
Alex #7
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by dtjoa:
I tested the new build (1.5.0.3). Found these issues:
   - Invite message trigger both OnInvite event and OnDeclineInvite event, shouldn't it trigger only OnInvite?
   - Calling method DeclineInvite(To, From, Reason) - throw null exception (object reference not set to an instance of an object)
   - Calling method DeclineInvite(To, From) - does not send out the decline message
fixed, new release coming when the following is addressed.

Quote by dtjoa:
   - Decline invite message trigger both OnInvite event and OnDeclineInvite event, shouldn't it trigger only OnDeclineInvite?

can you post the Xml which fires both events? Then I can debug this.

Alex
Avatar
dtjoa #8
Member since Jul 2012 · 39 posts
Group memberships: Members
Show profile · Link to this post
2012-07-20 09:29:23,265 [1] INFO  CmXmpp.CmXmppControl - RCV: <message xmlns="jabber:client" from="123@conference.test100.lab.com" to="dt200@test100.lab.com/MatriX">
  <x xmlns="http://jabber.org/protocol/muc#user">
    <decline from="dt201@test100.lab.com">
      <reason>busy</reason>
    </decline>
  </x>
</message>
2012-07-20 09:29:23,265 [1] INFO  CmXmpp.CmXmppControl - OnMessage
2012-07-20 09:29:23,265 [1] INFO  CmXmpp.CmXmppControl - OnInvite(123@conference.test100.lab.com)
2012-07-20 09:29:23,265 [1] INFO  CmXmpp.CmXmppControl - OnDeclineInvite(123@conference.test100.lab.com)
Avatar
Alex #9
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
thanks, I have uploaded a new build. Can you test it? Sorry for the inconvenience.

Alex
Avatar
dtjoa #10
Member since Jul 2012 · 39 posts
Group memberships: Members
Show profile · Link to this post
Alex,

I tried the latest build. here is the result:
  - Invite Decline event is corrected - only trigger OnDeclineInvite()
  - DeclineInvite() methods are corrected.

  - Invite event still triggers OnDeclineInvite() event, not just OnInvite(). Below is an Invite message
2012-07-20 16:21:28,781 [10] INFO  CmXmpp.CmXmppControl - RCV: <message xmlns="jabber:client" from="test@conference.test.lab.com" to="dt200@test.lab.com" type="normal">
  <x xmlns="http://jabber.org/protocol/muc#user">
    <invite from="dt201@test.lab.com/BORA-BORA">
      <reason>Please join us in this conference room.
Conference Room: test@conference.test.lab.com
</reason>
    </invite>
  </x>
  <x xmlns="jabber:x:conference" jid="test@conference.test.lab.com">Please join us in this conference room.
Conference Room: test@conference.test.lab.com
</x>
  <body>dt201@test.lab.com/BORA-BORA invites you to the room test@conference.test.lab.com (Please join us in this conference room.
Conference Room: test@conference.test.lab.com
) </body>
</message>
2012-07-20 16:21:28,781 [10] INFO  CmXmpp.CmXmppControl - OnMessage
2012-07-20 16:21:28,921 [10] INFO  CmXmpp.CmXmppControl - OnInvite(test@conference.test.lab.com)
2012-07-20 16:21:29,000 [10] INFO  CommonDialogs.CmDesktopAlerter - ShowAlert(test@conference.test.lab.com/dt200,<br/>Reason: Please join us in this conference room.
Conference Room: test@conference.test.lab.com,True,True)
2012-07-20 16:21:29,046 [10] INFO  CmXmpp.CmXmppControl - OnDeclineInvite(test@conference.test.lab.com)
Avatar
Alex #11
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
ok, there was a problem with inheritance because invite was derived by decline, which meant all invites are also declines.
I have changed this and it should work now. New build is uploaded and includes also classes for ResultSetManagement.

Alex
Avatar
dtjoa #12
Member since Jul 2012 · 39 posts
Group memberships: Members
Show profile · Link to this post
Alex,

Thanks. It now triggers correct event.

Regarding ResultSetManagement classes, could you provide information about them (namespace, class names, methods).
Avatar
Alex #13
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by dtjoa:
Regarding ResultSetManagement classes, could you provide information about them (namespace, class names, methods).

they are in the Matrix.Xmpp.ResultSetManagement namespace. All you need is the set class. Add a Set object when you want to use RSM, and also use this object to read the RSM parameters in the results.

Alex
Avatar
Alex #14
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #12
Quote by dtjoa:
Thanks. It now triggers correct event.

there was another small problem. New build is uploaded.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS