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
a811a1f8
Commit
a811a1f8
authored
May 19, 2014
by
Christian Schudt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LocalMUCRoom: toBareJID should be asBareJID, otherwise equals and contains doesn't work
parent
7e6a1bf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
LocalMUCRoom.java
src/java/org/jivesoftware/openfire/muc/spi/LocalMUCRoom.java
+3
-3
No files found.
src/java/org/jivesoftware/openfire/muc/spi/LocalMUCRoom.java
View file @
a811a1f8
...
@@ -681,8 +681,8 @@ public class LocalMUCRoom implements MUCRoom {
...
@@ -681,8 +681,8 @@ public class LocalMUCRoom implements MUCRoom {
* @return boolean
* @return boolean
*/
*/
private
boolean
canJoinRoom
(
LocalMUCUser
user
){
private
boolean
canJoinRoom
(
LocalMUCUser
user
){
boolean
isOwner
=
owners
.
contains
(
user
.
getAddress
().
to
BareJID
());
boolean
isOwner
=
owners
.
contains
(
user
.
getAddress
().
as
BareJID
());
boolean
isAdmin
=
admins
.
contains
(
user
.
getAddress
().
to
BareJID
());
boolean
isAdmin
=
admins
.
contains
(
user
.
getAddress
().
as
BareJID
());
return
(!
isDestroyed
&&
(!
hasOccupancyLimit
()
||
isAdmin
||
isOwner
||
(
getOccupantsCount
()
<
getMaxUsers
())));
return
(!
isDestroyed
&&
(!
hasOccupancyLimit
()
||
isAdmin
||
isOwner
||
(
getOccupantsCount
()
<
getMaxUsers
())));
}
}
...
@@ -740,7 +740,7 @@ public class LocalMUCRoom implements MUCRoom {
...
@@ -740,7 +740,7 @@ public class LocalMUCRoom implements MUCRoom {
}
else
{
}
else
{
// sanity check; make sure the nickname is owned by the same JID
// sanity check; make sure the nickname is owned by the same JID
if
(
occupants
.
size
()
>
0
)
{
if
(
occupants
.
size
()
>
0
)
{
String
existingJID
=
occupants
.
get
(
0
).
getUserAddress
().
to
BareJID
();
JID
existingJID
=
occupants
.
get
(
0
).
getUserAddress
().
as
BareJID
();
if
(!
bareJID
.
equals
(
existingJID
))
{
if
(!
bareJID
.
equals
(
existingJID
))
{
Log
.
warn
(
MessageFormat
.
format
(
"Conflict detected; {0} requested nickname '{1}'; already being used by {2}"
,
bareJID
,
nickname
,
existingJID
));
Log
.
warn
(
MessageFormat
.
format
(
"Conflict detected; {0} requested nickname '{1}'; already being used by {2}"
,
bareJID
,
nickname
,
existingJID
));
return
;
return
;
...
...
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