Commit d110644c authored by Roman Soldatow's avatar Roman Soldatow Committed by GitHub

Merge pull request #765 from KoolSpan/master

RestAPI plugin, synchronizing invalid room state when creating a room in a clustered Openfire
parents 9f73ae15 71663b27
......@@ -245,11 +245,6 @@ public class MUCRoomController {
room.setMaxUsers(mucRoomEntity.getMaxUsers());
room.setMembersOnly(mucRoomEntity.isMembersOnly());
room.setModerated(mucRoomEntity.isModerated());
// Fire RoomUpdateEvent if cluster is started
if (ClusterManager.isClusteringStarted()) {
CacheFactory.doClusterTask(new RoomUpdatedEvent((LocalMUCRoom) room));
}
// Set broadcast presence roles
if (mucRoomEntity.getBroadcastPresenceRoles() != null) {
......@@ -276,6 +271,11 @@ public class MUCRoomController {
// Unlock the room, because the default configuration lock the room.
room.unlock(room.getRole());
// Fire RoomUpdateEvent if cluster is started
if (ClusterManager.isClusteringStarted()) {
CacheFactory.doClusterTask(new RoomUpdatedEvent((LocalMUCRoom) room));
}
// Save the room to the DB if the room should be persistant
if (room.isPersistent()) {
......@@ -592,4 +592,4 @@ public class MUCRoomController {
throw new ServiceException("Could not delete affiliation", jid, ExceptionType.NOT_ALLOWED, Response.Status.CONFLICT, e);
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment