Not logged in. · Lost password · Register
Forum: agsXMPP RSS
presence
Avatar
masir_mohd #1
Member since Aug 2010 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: what is best solution to check if myUser joins to the room?
how can I check if JoinRoom Works Correctly and I am in the room now?

           MucManager mucManager = new MucManager(_Connection);           
            agsXMPP.Jid aRoom = new agsXMPP.Jid(roomName);
            //OnPresenceWaitHandle.WaitOne();
            if (password == string.Empty)
                mucManager.JoinRoom(aRoom, UserJid.Bare, true);
            else           
                mucManager.JoinRoom(aRoom, UserJid.Bare, password, true);
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
After success you should get presence packets which includes also your own presence.
On failure you should get an presence of type error.

See also the examples here:
http://xmpp.org/extensions/xep-0045.html#enter

Alex
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: agsXMPP RSS