Commit 6802b30c by Lee Munkyeong

CoviewAPIのLoginId修正対応。

parent 019a8683
......@@ -225,6 +225,10 @@
}
}
String.prototype.replaceAll = function(org, dest) {
return this.split(org).join(dest);
}
async function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
......
......@@ -2509,6 +2509,11 @@ CHAT_UI.startCollaboration = function(collaborationType) {
CHAT_UI.refreshJoinedCollaboration = function(loginIdList) {
for (var count = 0 ; count < loginIdList.length ; count++) {
loginIdList[count] = loginIdList[count].replaceAll(globalUserInfo.shopName + '_','');
}
CHAT_UI.showLoadingIndicator();
$('#collaboration_overlay_user_list').html('');
......
......@@ -165,7 +165,7 @@ $(function () {
captureAndShareImage(CMS_SERVER_URL + '/chatapi/file/uploadArchive', data.payload.name);
}
} else if (data.type === "HOST_CHANGE_REQUEST") {
if (data.payload.loginId == CHAT.globalLoginParameter.loginId) {
if (data.payload.loginId == globalUserInfo.loginId) {
fw.sendToMsg('others', 'HOST_CHANGE_RESPONSE', {"isAndroid": CHAT_UTIL.isAndroid(), "isAble" : androidVersion >= ANDROID_SDK_VERSION.O, "loginId": CHAT.globalLoginParameter.loginId});
}
} else if (data.type === "HOST_CHANGE_RESPONSE") {
......@@ -174,7 +174,7 @@ $(function () {
if (g_isMainMan && isAndroid && !isAble && joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
alert(getLocalizedString('err_target_android_version_not_support'));
} else {
Coview_changeHost(data.payload.loginId);
Coview_changeHost(getFermiLoginId(data.payload.loginId));
}
} else if (data.type === "API_SEND_OWNER_CHANGE_COMPLETE") {
if ($('#recordBtn').hasClass('bg_red')) {
......@@ -183,7 +183,7 @@ $(function () {
penOff();
} else if (data.type === "CHANGE_HOST_APPLY") {
if(confirm(getLocalizedString('norify_request_host_change',data.payload.hostId))) {
Coview_changeHost(data.payload.hostId);
Coview_changeHost(getFermiLoginId(data.payload.hostId));
}
}
});
......@@ -598,9 +598,9 @@ function hostSearchInterval() {
}
if (hostName != g_isMainManUsername) {
if (hostName != "") {
$("#collaboration_user_" + hostName).removeClass("host");
$("#collaboration_user_" + getReplacedLoginId(hostName)).removeClass("host");
}
$("#collaboration_user_" + g_isMainManUsername).addClass("host");
$("#collaboration_user_" + getReplacedLoginId(g_isMainManUsername)).addClass("host");
hostName = g_isMainManUsername;
} else {
if (hostName == "") {
......@@ -608,8 +608,8 @@ function hostSearchInterval() {
$("#collaboration_user_" + CHAT.globalLoginParameter.loginId).addClass("host");
}
} else {
if (!$("#collaboration_user_" + hostName).hasClass('host')) {
$("#collaboration_user_" + hostName).addClass("host");
if (!$("#collaboration_user_" + getReplacedLoginId(hostName)).hasClass('host')) {
$("#collaboration_user_" + getReplacedLoginId(hostName)).addClass("host");
}
}
......@@ -619,7 +619,15 @@ function hostSearchInterval() {
}
function hostChangeRequest(loginId) {
fw.sendToMsg('others', 'HOST_CHANGE_REQUEST', {"loginId": loginId});
fw.sendToMsg('others', 'HOST_CHANGE_REQUEST', {"loginId": getFermiLoginId(loginId)});
}
function getFermiLoginId(loginId) {
return globalUserInfo.shopName + '_' + loginId;
}
function getReplacedLoginId(loginId) {
return loginId.replaceAll(globalUserInfo.shopName + '_', '');
}
function captureAndShareImage(urls, changeHostName) {
......
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