prepend server name to room id in order to make ids unique across server connections
This commit is contained in:
@@ -72,7 +72,7 @@ class ChatRoomController {
|
||||
params['host'] = model.host
|
||||
params['roomTabName'] = newRoom
|
||||
|
||||
mvcGroup.parentGroup.createMVCGroup("chat-room", newRoom, params)
|
||||
mvcGroup.parentGroup.createMVCGroup("chat-room", model.host.getHumanReadableName()+"-"+newRoom, params)
|
||||
}
|
||||
}
|
||||
if (command.action == ChatAction.LEAVE && !model.console) {
|
||||
|
@@ -97,7 +97,7 @@ class ChatServerModel {
|
||||
}
|
||||
if (chatCommand.action == ChatAction.SAY &&
|
||||
room == core.me.toBase64()) {
|
||||
String groupId = e.sender.getHumanReadableName() + "-private-chat"
|
||||
String groupId = host.getHumanReadableName()+"-"+e.sender.getHumanReadableName() + "-private-chat"
|
||||
if (!mvcGroup.childrenGroups.containsKey(groupId)) {
|
||||
def params = [:]
|
||||
params['core'] = core
|
||||
@@ -110,7 +110,8 @@ class ChatServerModel {
|
||||
mvcGroup.createMVCGroup("chat-room",groupId, params)
|
||||
}
|
||||
room = groupId
|
||||
}
|
||||
} else
|
||||
room = host.getHumanReadableName()+"-"+room
|
||||
mvcGroup.childrenGroups[room]?.controller?.handleChatMessage(e)
|
||||
}
|
||||
|
||||
|
@@ -69,7 +69,7 @@ class ChatServerView {
|
||||
params['roomTabName'] = 'Console'
|
||||
params['console'] = true
|
||||
params['host'] = model.host
|
||||
mvcGroup.createMVCGroup("chat-room",ChatServer.CONSOLE, params)
|
||||
mvcGroup.createMVCGroup("chat-room",model.host.getHumanReadableName()+"-"+ChatServer.CONSOLE, params)
|
||||
}
|
||||
|
||||
def closeTab = {
|
||||
|
Reference in New Issue
Block a user