Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
AliVireTechnologies1 #1
Member since Jun 2013 · 58 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to Create a group for group chat?
I want to create a group for group chat how can I create a group ?
Avatar
Alex #2
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Please use the forums search for this, This was discussed here several times before.

With MucManager.EnterRoom you can join an existing room. When the room does not exist already it gets created automatically. So the same function is for joining an existing room and creating a new one.
Avatar
AliVireTechnologies1 #3
Member since Jun 2013 · 58 posts
Group memberships: Members
Show profile · Link to this post
em using the following code is it correct ? actually what em doing is I create a new group page giving  a room name fetching contacts and populating in dictionary object "contactgroup" with key equal to phone number and value equal to contact name, does this code will work ? em inviting all invitees and then joining the room. I also want to ask that from what event invitees will get the invitation message if it will also get the xmppclient.Onpresence or xmppclient.Messages or xmppclient.Onroaster item or those event will be separate.

 if (txtgroupname.Text != "")
            {
                if (Utility.contactgroup.Count > 0)
                {
                    MucManager mucManager = new MucManager(Utility.xmppClient);                 
                    string roomId = txtgroupname.Text + "@" + Utility.Domain;
                    Jid m_RoomJid = new Jid(roomId);

                    foreach (KeyValuePair<string, string> cg in Utility.contactgroup) //cg.key =PhoneNumber cg.value=Name of User
                    {

                        mucManager.Invite(cg.Value + "@" + Utility.Domain, txtgroupname.Text + "@" + Utility.Domain + "/" + cg.Value, "");
                    }

                    mucManager.CreateEnterRoomStanza(roomId, Utility.xmppClient.Username);
                    mucManager.EnterRoom(m_RoomJid, Utility.xmppClient.Username, true);
                }
            }
            else
            {

                MessageBox.Show("Please Enter a longer subject");
           
            }
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