Not logged in. · Lost password · Register
Forum: agsXMPP SDK Support RSS
Avatar
Gensi #1
Member since Oct 2008 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: How to answer an invite to a chatroom
Hello,

i got an invite message to a chatroom. How can i join this room. I wrote the following code, but it did not work:

        private void UserAgent_OnMessage(object sender, agsXMPP.protocol.client.Message msg)
        {
            switch (msg.Type)
            {
                case agsXMPP.protocol.client.MessageType.normal :
                    agsXMPP.protocol.x.muc.Invite invite = msg.SelectSingleElement("invite", true) as agsXMPP.protocol.x.muc.Invite;
                    if (invite != null)
                    {
                        agsXMPP.protocol.x.muc.MucManager mucManager = new agsXMPP.protocol.x.muc.MucManager(m_provider.UserAgent);
                        mucManager.JoinRoom(msg.From, null);
                    }
                    break;
            }
        }
Avatar
Alex #2
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you need a nickname for the room. So the second argument of JoinRoom shouldn't be null but contain your nickname.
If it still does not work then please post some logs.

Alex
Alexander Gnauck
AG-Software
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 SDK Support RSS