Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page:  1  2  next
Avatar
softyboy #1
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Subject: Conference invitation Accept
Hello,

How can accept and decline conference invitation. with mucManager classs.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
  • If you want to accept the invitation then just join the room.
  • to decline the invite use the Decline() member of the MucManager

Alex
Avatar
softyboy #3
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
tanks alex,

alex i would like to know which event will be generate when some body send me invitation for conference.

( i have done send invitaion to user )
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Because a invite is sent inside a message stanza you get an OnMessage event. In this event you have to check if it is a normal message or a invite or something else.
Avatar
softyboy #5
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Thanks alex for great support.
i have get he xml but how can get the invitaion jid  from xml .
Avatar
Jabberer #6
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
i don't understand your question.
From which event, or which xml you want to get a Jid?
And which Jid you you want?
The Jid of the person which invites you, or the Jid of the chatroom to which you get the invite?
Software Developer
AG-Software
Avatar
softyboy #7
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
ya jaberer,

jid of the person which invites me, and jid of the chatroom which send me the invitation.
This post was edited on 2006-09-14, 09:46 by softyboy.
Avatar
Jabberer #8
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
get the invite object of rfom the message object and use the properties of the invite object.
Software Developer
AG-Software
Avatar
softyboy #9
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
hello jabberer,
 
i have write these code
 Private Sub m_XMPPConnection_OnMessage(ByVal sender As Object, ByVal msg As agsXMPP.protocol.client.Message) Handles

        Dim inv As New x.muc.Invite=ctype(msg,x.muc.invite)
end sub

but it's generate type conversion error,

i mean to say how can get the invite object from message object
Avatar
Jabberer #10
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
sure, you can't cast Message to Invite.
Invite is a childnode of msg, so use:

  1. msg.SelectSingleElement(typeof(Invite));
Software Developer
AG-Software
Avatar
softyboy #11
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
thanks jabberer,
but still i have facing problem.

in OnMessage() event------

Dim m_Invite As Invite
 m_Invite = msg.SelectSingleElement(gettype(invite))-- It return nothing when user send the conference request.

 MsgBox("Invite from " + m_Invite.From.User)
  MsgBox("Invite Id " + m_Invite.Id.ToString)
Avatar
Alex #12
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Please post the XML of your message and your invite object.
Avatar
softyboy #13
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
thanks Alex,


 Sub m_XMPPConnection_OnMessage(ByVal sender As Object, ByVal msg As agsXMPP.protocol.client.Message) Handles m_XMPPConnection.OnMessage

        Dim m_Invite As Invite

        m_Invite = msg.SelectSingleElement("invite") - return nothing

        If InvokeRequired Then
            BeginInvoke(CType(AddressOf m_XMPPConnection_OnMessage, agsXMPP.XmppClientConnection.MessageHandler), New   Object() {sender, msg})
            Return
        End If

End Sub
in OnReadXml enevt get xml

 Private Sub m_XMPPConnection_OnReadXml(ByVal sender As Object, ByVal xml As String) Handles m_XMPPConnection.OnReadXml
    <message xmlns="jabber:client" from="parwej_5ip@conference.java" to="me@java">
          <x xmlns="http://jabber.org./protocol/muc#user">
              <invite from="parwej@java">
                    <reason>Please join me in a conference. </reason>
              </invite>
         </x>
        <x xmlns="jabber:x:conference" jid="parwej_5i9@conference.java" />
    </message>
   

    End Sub
This post was edited on 2006-09-14, 13:44 by softyboy.
Avatar
Jabberer #14
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
OK i see,

you have to get the agsXMPP.protocol.x.muc.User object first and then the Invite Object from the User object.
Software Developer
AG-Software
Avatar
softyboy #15
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
you mean,


 Dim User As agsXMPP.protocol.x.muc.User
 User.Invite = msg.SelectSingleElement(GetType(Invite))
  Dim m_Invite As Invite = User.Invite

but it not work , if any pls tell me
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:
Page:  1  2  next
Forum: agsXMPP RSS