From a71b6c92d6d3cba911bcda69897b1c6a140f1560 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Sat, 30 Oct 2004 17:14:15 +0000 Subject: [PATCH] Modified form's variable names according to the new spec version. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2399 b35dd754-fafc-0310-a699-88a17e54d16e --- documentation/extensions/muc.html | 4 ++-- .../smackx/muc/MultiUserChatCreationTest.java | 2 +- .../smackx/muc/MultiUserChatTest.java | 22 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/documentation/extensions/muc.html b/documentation/extensions/muc.html index 2e8cbbab2..edb77f8bc 100644 --- a/documentation/extensions/muc.html +++ b/documentation/extensions/muc.html @@ -413,7 +413,7 @@ In this example we can see how to grant voice to a visitor and listen for the no // User1 (which is the room owner) configures the room as a moderated room Form form = muc.getConfigurationForm(); Form answerForm = form.createAnswerForm(); - answerForm.setAnswer("muc#owner_moderatedroom", "1"); + answerForm.setAnswer("muc#roomconfig_moderatedroom", "1"); muc.sendConfigurationForm(answerForm); // User2 joins the new room (as a visitor) @@ -550,7 +550,7 @@ In this example we can see how to grant admin privileges to a user and listen fo // User1 (which is the room owner) configures the room as a moderated room Form form = muc.getConfigurationForm(); Form answerForm = form.createAnswerForm(); - answerForm.setAnswer("muc#owner_moderatedroom", "1"); + answerForm.setAnswer("muc#roomconfig_moderatedroom", "1"); muc.sendConfigurationForm(answerForm); // User2 joins the new room (as a visitor) diff --git a/test/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java b/test/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java index e99f94c64..a57426a7b 100644 --- a/test/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java +++ b/test/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java @@ -100,7 +100,7 @@ public class MultiUserChatCreationTest extends SmackTestCase { } List owners = new ArrayList(); owners.add(getBareJID(0)); - submitForm.setAnswer("muc#owner_roomowners", owners); + submitForm.setAnswer("muc#roomconfig_roomowners", owners); // Update the new room's configuration muc.sendConfigurationForm(submitForm); diff --git a/test/org/jivesoftware/smackx/muc/MultiUserChatTest.java b/test/org/jivesoftware/smackx/muc/MultiUserChatTest.java index 00989f65b..bc68a0d7f 100644 --- a/test/org/jivesoftware/smackx/muc/MultiUserChatTest.java +++ b/test/org/jivesoftware/smackx/muc/MultiUserChatTest.java @@ -368,9 +368,9 @@ public class MultiUserChatTest extends SmackTestCase { // User2 registers with the room and reserves a nickname Form registrationForm = muc2.getRegistrationForm(); Form answerForm = registrationForm.createAnswerForm(); - answerForm.setAnswer("muc#user_first", "MyFirstName"); - answerForm.setAnswer("muc#user_last", "MyLastName"); - answerForm.setAnswer("muc#user_roomnick", "MyNick"); + answerForm.setAnswer("muc#register_first", "MyFirstName"); + answerForm.setAnswer("muc#register_last", "MyLastName"); + answerForm.setAnswer("muc#register_roomnick", "MyNick"); muc2.sendRegistrationForm(answerForm); // Check that user2 has a reserved nickname @@ -405,9 +405,9 @@ public class MultiUserChatTest extends SmackTestCase { // Check that another user cannot reserve an already reserved nickname registrationForm = muc3.getRegistrationForm(); answerForm = registrationForm.createAnswerForm(); - answerForm.setAnswer("muc#user_first", "MyFirstName 2"); - answerForm.setAnswer("muc#user_last", "MyLastName 2"); - answerForm.setAnswer("muc#user_roomnick", "MyNick"); + answerForm.setAnswer("muc#register_first", "MyFirstName 2"); + answerForm.setAnswer("muc#register_last", "MyLastName 2"); + answerForm.setAnswer("muc#register_roomnick", "MyNick"); try { muc3.sendRegistrationForm(answerForm); } @@ -425,9 +425,9 @@ public class MultiUserChatTest extends SmackTestCase { // Check that another user can reserve a new nickname registrationForm = muc3.getRegistrationForm(); answerForm = registrationForm.createAnswerForm(); - answerForm.setAnswer("muc#user_first", "MyFirstName 2"); - answerForm.setAnswer("muc#user_last", "MyLastName 2"); - answerForm.setAnswer("muc#user_roomnick", "MyNick 2"); + answerForm.setAnswer("muc#register_first", "MyFirstName 2"); + answerForm.setAnswer("muc#register_last", "MyLastName 2"); + answerForm.setAnswer("muc#register_roomnick", "MyNick 2"); muc3.sendRegistrationForm(answerForm); } @@ -1380,12 +1380,12 @@ public class MultiUserChatTest extends SmackTestCase { // User1 (which is the room owner) converts the instant room into a moderated room Form form = muc.getConfigurationForm(); Form answerForm = form.createAnswerForm(); - answerForm.setAnswer("muc#owner_moderatedroom", true); + answerForm.setAnswer("muc#roomconfig_moderatedroom", true); // Keep the room owner try { List owners = new ArrayList(); owners.add(getBareJID(0)); - answerForm.setAnswer("muc#owner_roomowners", owners); + answerForm.setAnswer("muc#roomconfig_roomowners", owners); } catch (IllegalArgumentException e) { // Do nothing