Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
3df71ba3
Commit
3df71ba3
authored
Dec 18, 2014
by
Christian Schudt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-474 OpenFire still provides entry forms for already-registered room users
parent
8f094c44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
IQMUCRegisterHandler.java
...g/jivesoftware/openfire/muc/spi/IQMUCRegisterHandler.java
+13
-11
No files found.
src/java/org/jivesoftware/openfire/muc/spi/IQMUCRegisterHandler.java
View file @
3df71ba3
...
...
@@ -141,18 +141,20 @@ class IQMUCRegisterHandler {
if
(
nickname
!=
null
)
{
// The user is already registered with the room so answer a completed form
ElementUtil
.
setProperty
(
currentRegistration
,
"query.registered"
,
null
);
currentRegistration
.
addElement
(
"username"
).
addText
(
nickname
);
Element
form
=
currentRegistration
.
element
(
QName
.
get
(
"x"
,
"jabber:x:data"
));
@SuppressWarnings
(
"unchecked"
)
Iterator
<
Element
>
fields
=
form
.
elementIterator
(
"field"
);
Element
field
;
while
(
fields
.
hasNext
())
{
field
=
fields
.
next
();
if
(
"muc#register_roomnick"
.
equals
(
field
.
attributeValue
(
"var"
)))
{
field
.
addElement
(
"value"
).
addText
(
nickname
);
}
}
currentRegistration
.
remove
(
form
);
//
@SuppressWarnings("unchecked")
//
Iterator<Element> fields = form.elementIterator("field");
//
//
Element field;
//
while (fields.hasNext()) {
//
field = fields.next();
//
if ("muc#register_roomnick".equals(field.attributeValue("var"))) {
//
field.addElement("value").addText(nickname);
//
}
//
}
reply
.
setChildElement
(
currentRegistration
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment