Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
Species1 #1
Member since Jun 2006 · 2 posts · Location: UK
Group memberships: Members
Show profile · Link to this post
Subject: groupchat message sending problem
Hi Support ... I have a problem sending a message into a MUC room, I manage to join the room (or create a new one), but if I try a send a message into it marked as MessageType.groupchat,  I always get an error saying that I cannot send a private message marked as a groupchat

Here is the code I use to join the test room on the conference server

Presence pr = new Presence();
          
            if (roomJID == null)
            {
                man = new MucManager(XmppCon);

                roomJID = new Jid("test@conference.jabber.org/tester2");

                // Setup new Message Callback
                XmppCon.MesagageGrabber.Add(roomJID, new BareJidComparer(), new MessageCB(MessageCallback), null);

                // Setup new Presence Callback
                XmppCon.PresenceGrabber.Add(roomJID, new BareJidComparer(), new PresenceCB(PresenceCallback), null);

            }

            man.JoinRoom(roomJID, "tester2");

Here is the code I use to send a message into that chat room

            if (XmppCon != null && XmppCon.ClientSocket.Connected)
            {
                if (inputText.Text.Length > 0)
                {
                    agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message(roomJID,MessageType.groupchat,inputText.Text);
                    XmppCon.Send(msg);

                    inputText.Text = "";
                    inputText.Focus();
                }
            }

All help gratefully received!!!!!

Dave.
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

i assume you send the message to a wrong Jid.
Here you set/overwrite a jid:
  1. roomJID = new Jid("test@conference.jabber.org/tester2");
And this is not the Jid of the room, its a Jid of an occupant. Make sure that you send your messages to test@conference.jabber.org.
Let me know if this was the problem. If it still does not work please post your XML debug.

Alex
Avatar
Species1 #3
Member since Jun 2006 · 2 posts · Location: UK
Group memberships: Members
Show profile · Link to this post
Thanks Alex - you hit the nail on the head!!

Obviously I searched the forum for answers first - and the thing I was continually impressed with was the quality and accuracy of the technical support - Thanks for making life so much easier for all of us!!

Regards

    Dave.
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