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
7d1e5df1
Commit
7d1e5df1
authored
Feb 10, 2016
by
Dave Cridland
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #536 from derekmcl/master
Cannot join room in a cluster after an availability update.
parents
3b42538c
1a5781c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
14 deletions
+29
-14
LocalMUCRoom.java
src/java/org/jivesoftware/openfire/muc/spi/LocalMUCRoom.java
+29
-14
No files found.
src/java/org/jivesoftware/openfire/muc/spi/LocalMUCRoom.java
View file @
7d1e5df1
...
@@ -1868,20 +1868,35 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
...
@@ -1868,20 +1868,35 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
public
boolean
isManuallyLocked
()
{
public
boolean
isManuallyLocked
()
{
return
lockedTime
>
0
&&
creationDate
.
getTime
()
!=
lockedTime
;
return
lockedTime
>
0
&&
creationDate
.
getTime
()
!=
lockedTime
;
}
}
@Override
/**
public
void
presenceUpdated
(
MUCRole
occupantRole
,
Presence
newPresence
)
{
* Handles occupants updating their presence in the chatroom. Assumes the user updates their presence whenever their
// Ask other cluster nodes to update the presence of the occupant
* availability in the room changes. This method should not be called to handle other presence related updates, such
UpdatePresence
request
=
new
UpdatePresence
(
this
,
newPresence
.
createCopy
(),
occupantRole
.
getNickname
());
* as nickname changes.
CacheFactory
.
doClusterTask
(
request
);
* {@inheritDoc}
*/
// Update the presence of the occupant
@Override
request
=
new
UpdatePresence
(
this
,
newPresence
.
createCopy
(),
occupantRole
.
getNickname
());
public
void
presenceUpdated
(
final
MUCRole
occupantRole
,
final
Presence
newPresence
)
{
request
.
setOriginator
(
true
);
final
String
occupantNickName
=
occupantRole
.
getNickname
();
request
.
run
();
// Update the presence of the occupant on the local node with the occupant's new availability. Updates the
// Broadcast new presence of occupant
// local node first so the remote nodes receive presence that correctly reflects the occupant's new
broadcastPresence
(
occupantRole
.
getPresence
().
createCopy
(),
false
);
// availability and previously existing role and affiliation with the room.
final
UpdatePresence
localUpdateRequest
=
new
UpdatePresence
(
this
,
newPresence
.
createCopy
(),
occupantNickName
);
localUpdateRequest
.
setOriginator
(
true
);
localUpdateRequest
.
run
();
// Get the new, updated presence for the occupant in the room. The presence reflects the occupant's updated
// availability and their existing association.
final
Presence
updatedPresence
=
occupantRole
.
getPresence
().
createCopy
();
// Ask other cluster nodes to update the presence of the occupant. Uses the updated presence from the local
// MUC role.
final
UpdatePresence
clusterUpdateRequest
=
new
UpdatePresence
(
this
,
updatedPresence
,
occupantNickName
);
CacheFactory
.
doClusterTask
(
clusterUpdateRequest
);
// Broadcast updated presence of occupant.
broadcastPresence
(
updatedPresence
,
false
);
}
}
/**
/**
...
...
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