mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 07:22:07 +01:00
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
This commit is contained in:
parent
f206a82119
commit
a71b6c92d6
3 changed files with 14 additions and 14 deletions
|
@ -413,7 +413,7 @@ In this example we can see how to grant voice to a visitor and listen for the no
|
|||
<font color="#3f7f5f">// User1 (which is the room owner) configures the room as a moderated room</font>
|
||||
Form form = muc.getConfigurationForm();
|
||||
Form answerForm = form.createAnswerForm();
|
||||
answerForm.setAnswer(<font color="#0000FF">"muc#owner_moderatedroom"</font>, <font color="#0000FF">"1"</font>);
|
||||
answerForm.setAnswer(<font color="#0000FF">"muc#roomconfig_moderatedroom"</font>, <font color="#0000FF">"1"</font>);
|
||||
muc.sendConfigurationForm(answerForm);
|
||||
|
||||
<font color="#3f7f5f">// User2 joins the new room (as a visitor)</font>
|
||||
|
@ -550,7 +550,7 @@ In this example we can see how to grant admin privileges to a user and listen fo
|
|||
<font color="#3f7f5f">// User1 (which is the room owner) configures the room as a moderated room</font>
|
||||
Form form = muc.getConfigurationForm();
|
||||
Form answerForm = form.createAnswerForm();
|
||||
answerForm.setAnswer(<font color="#0000FF">"muc#owner_moderatedroom"</font>, <font color="#0000FF">"1"</font>);
|
||||
answerForm.setAnswer(<font color="#0000FF">"muc#roomconfig_moderatedroom"</font>, <font color="#0000FF">"1"</font>);
|
||||
muc.sendConfigurationForm(answerForm);
|
||||
|
||||
<font color="#3f7f5f">// User2 joins the new room (as a visitor)</font>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue