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
...@@ -246,11 +246,6 @@ public class MUCRoomController { ...@@ -246,11 +246,6 @@ public class MUCRoomController {
room.setMembersOnly(mucRoomEntity.isMembersOnly()); room.setMembersOnly(mucRoomEntity.isMembersOnly());
room.setModerated(mucRoomEntity.isModerated()); room.setModerated(mucRoomEntity.isModerated());
// Fire RoomUpdateEvent if cluster is started
if (ClusterManager.isClusteringStarted()) {
CacheFactory.doClusterTask(new RoomUpdatedEvent((LocalMUCRoom) room));
}
// Set broadcast presence roles // Set broadcast presence roles
if (mucRoomEntity.getBroadcastPresenceRoles() != null) { if (mucRoomEntity.getBroadcastPresenceRoles() != null) {
room.setRolesToBroadcastPresence(mucRoomEntity.getBroadcastPresenceRoles()); room.setRolesToBroadcastPresence(mucRoomEntity.getBroadcastPresenceRoles());
...@@ -277,6 +272,11 @@ public class MUCRoomController { ...@@ -277,6 +272,11 @@ public class MUCRoomController {
// Unlock the room, because the default configuration lock the room. // Unlock the room, because the default configuration lock the room.
room.unlock(room.getRole()); 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 // Save the room to the DB if the room should be persistant
if (room.isPersistent()) { if (room.isPersistent()) {
room.saveToDB(); room.saveToDB();
......
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