public static BaseClientApplication SwitchRoom(BaseProtocol from,string roomFullName, Variant configuration)
{
var appName = GetAppName(roomFullName);
if (((string) configuration[Defines.CONF_APPLICATION_NAME]).Split('/')[0] != appName)
{
return from.Application = GetOrCreateRoom(roomFullName);
}
if (roomFullName == (string) configuration[Defines.CONF_APPLICATION_NAME] || string.IsNullOrEmpty(roomFullName))
{//为自身
return from.Application;
}
var app = FindAppByName(roomFullName) ?? CreateRoom(from.Application, roomFullName);
from.Application = app;
return app;
}