Commit 77633afa authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Do not allow to create a room if MUC delete does not allow it.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10464 b35dd754-fafc-0310-a699-88a17e54d16e
parent 05c7302b
...@@ -480,10 +480,18 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService ...@@ -480,10 +480,18 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService
catch (IllegalArgumentException e) { catch (IllegalArgumentException e) {
// Check if room needs to be recreated in case it failed to be created previously // Check if room needs to be recreated in case it failed to be created previously
// (or was deleted somehow and is expected to exist by a delegate). // (or was deleted somehow and is expected to exist by a delegate).
if (mucEventDelegate != null && mucEventDelegate.loadConfig(room)) { if (mucEventDelegate != null) {
loaded = true; if (mucEventDelegate.loadConfig(room)) {
if (room.isPersistent()) { loaded = true;
MUCPersistenceManager.saveToDB(room); if (room.isPersistent()) {
MUCPersistenceManager.saveToDB(room);
}
}
else {
// Room does not exist and delegate does not recognize it and does
// not allow room creation
throw new NotAllowedException();
} }
} }
else { else {
......
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