Subject: Can't change muc fields values
Try to create a muc room and config with custom settings, but it seems nothing is set on the server.
I am using Openfire as XMPP server.
Below is my code, and XML output, really need help...
thanks in advance!
I am using Openfire as XMPP server.
Below is my code, and XML output, really need help...
thanks in advance!
- private void CreateRoom()
- {
- string name = "vs2013";
- //string desc = "testing room vs2013";
- muc.JoinRoom(roomjid,"a");
- muc.GrantOwnershipPrivileges(roomjid, mejid);
- }
- private void OnRequestConfiguration(object sender, IQ iq, object obj)
- {
- oIq.Type = IqType.set;
- xForm.Type = XDataFormType.submit;
- f_form.Var = "FORM_TYPE";
- f_form.Value = "http://jabber.org/protocol/muc#roomconfig";
- xForm.AddField(f_form);
- f_title.Var = "muc#roomconfig_roomname";
- f_title.Value = "VS2013-1";
- xForm.AddField(f_title);
- f_roomdesc.Var = "muc#roomconfig_roomdesc";
- f_roomdesc.Value = "VS2013 Created Room";
- xForm.AddChild(f_roomdesc);
- f_changesubject.Var = "muc#roomconfig_changesubject";
- f_changesubject.Value = "1";
- xForm.AddChild(f_changesubject);
- f_public.Var = "muc#roomconfig_publicroom";
- f_public.Value = "1";
- xForm.AddChild(f_public);
- f_persistent.Var = "muc#roomconfig_persistentroom";
- f_persistent.Value = "1";
- xForm.AddChild(f_persistent);
- f_moderatedroom.Var = "muc#roomconfig_moderatedroom";
- f_moderatedroom.Value = "0";
- xForm.AddChild(f_moderatedroom);
- f_membersonly.Var = "muc#roomconfig_membersonly";
- f_membersonly.Value = "0";
- xForm.AddChild(f_membersonly);
- f_allowinvites.Var = "muc#roomconfig_allowinvites";
- f_allowinvites.Value = "0";
- xForm.AddChild(f_allowinvites);
- f_private.Var = "muc#roomconfig_passwordprotectedroom";
- f_private.Value = "1";
- xForm.AddChild(f_private);
- f_password.Var = "muc#roomconfig_roomsecret";
- f_password.Value = "mars";
- xForm.AddChild(f_password);
- oIq.Query.AddChild(xForm);
- }
- public void OnRoomConigResult(object sender, IQ iq, object data)
- {
- if (iq.Type == IqType.result)
- {
- //success
- }
- else if (iq.Type == IqType.error)
- {
- //error
- }
- }