Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
a1bee735
Commit
a1bee735
authored
Jun 11, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed ios post message to KEY
parent
69c96185
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
23 deletions
+56
-23
public_new/js/chat-ui-collaboration.js
+8
-4
public_new/js/chat-ui.js
+21
-12
public_new/js/chat.js
+4
-2
public_new/js/constant.js
+15
-1
public_new/js/share.js
+8
-4
No files found.
public_new/js/chat-ui-collaboration.js
View file @
a1bee735
CHAT_UI
.
joinCollaboration
=
function
(
collaborationType
,
meetingId
=
0
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
const
COLLABORATION_TYPE_KEY
=
POST_MESSAGE_KEY
.
COLLABORATION_TYPE
;
const
MEETING_ID_KEY
=
POST_MESSAGE_KEY
.
MEETING_ID
;
webkit
.
messageHandlers
.
joinCollaboration
.
postMessage
({
"collaborationType"
:
collaborationType
,
"meetingId"
:
meetingId
,
COLLABORATION_TYPE_KEY
:
collaborationType
,
MEETING_ID_KEY
:
meetingId
,
});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
if
(
...
...
@@ -393,9 +395,11 @@ CHAT_UI.confirmInviteUserListInCollaboration = function () {
CHAT_UTIL
.
getCollaborationType
(
globalUserInfo
.
coWorkType
)
);
}
else
{
const
USER_ID_LIST_KEY
=
POST_MESSAGE_KEY
.
USER_ID_LIST
;
const
COLLABORATION_TYPE_KEY
=
POST_MESSAGE_KEY
.
COLLABORATION_TYPE
;
webkit
.
messageHandlers
.
inviteCollaboration
.
postMessage
({
"userIdList"
:
userIdList
.
join
(
","
),
"collaborationType"
:
CHAT_UTIL
.
getCollaborationType
(
USER_ID_LIST_KEY
:
userIdList
.
join
(
","
),
COLLABORATION_TYPE_KEY
:
CHAT_UTIL
.
getCollaborationType
(
globalUserInfo
.
coWorkType
),
});
...
...
public_new/js/chat-ui.js
View file @
a1bee735
...
...
@@ -142,8 +142,9 @@ $('a[data-toggle="pill"]').on("show.bs.tab", function (e) {
if
(
typeof
android
!=
"undefined"
)
{
android
.
updateRoomList
();
}
else
{
const
GROUP_ID_KEY
=
POST_MESSAGE_KEY
.
GROUP_ID
;
webkit
.
messageHandlers
.
updateRoomList
.
postMessage
({
"groupId"
:
"0"
,
GROUP_ID_KEY
:
"0"
,
});
}
});
...
...
@@ -1024,9 +1025,11 @@ CHAT_UI.joinRoom = function (roomId, roomName) {
alert(getLocalizedString("err_not_exist_room"));
}
} else {
const ROOM_ID_KEY = POST_MESSAGE_KEY.ROOM_ID;
const ROOM_NAME = POST_MESSAGE_KEY.ROOM_NAME;
webkit.messageHandlers.joinRoom.postMessage({
"roomId"
: roomId,
"roomName"
: roomName,
ROOM_ID_KEY
: roomId,
ROOM_NAME
: roomName,
});
}
};
...
...
@@ -2167,8 +2170,9 @@ CHAT_UI.showAddUserConfirmView = function () {
if (typeof android != "undefined") {
android.inviteUsers(userIdList.join(","), false);
} else {
const USER_ID_LIST_KEY = POST_MESSAGE_KEY.USER_ID_LIST;
webkit.messageHandlers.inviteUsers.postMessage({
"userIdList"
: userIdList.join(","),
USER_ID_LIST_KEY
: userIdList.join(","),
});
}
});
...
...
@@ -2396,7 +2400,8 @@ CHAT_UI.offlineHandler = function (e) {
CHAT_UI.displayExistRoom = function (roomId) {
if (confirm("error_already_exist_same_user")) {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.joinRoom.postMessage({ "roomId": roomId });
const ROOM_ID_KEY = POST_MESSAGE_KEY.ROOM_ID;
webkit.messageHandlers.joinRoom.postMessage({ ROOM_ID_KEY: roomId });
} else if (CHAT_UTIL.isAndroid()) {
android.joinRoom(roomId, "");
}
...
...
@@ -2421,12 +2426,17 @@ var createChatRoom = function (
isVoice
);
} else {
const ROOM_TYPE_KEY = POST_MESSAGE_KEY.ROOM_TYPE;
const USER_ID_LIST_KEY = POST_MESSAGE_KEY.USER_ID_LIST;
const ROOM_NAME_KEY = POST_MESSAGE_KEY.ROOM_NAME;
const SCREEN_FLAG_KEY = POST_MESSAGE_KEY.SCREEN_FLAG;
const IS_VOICE_KEY = POST_MESSAGE_KEY.IS_VOICE;
webkit.messageHandlers.createChatRoom.postMessage({
"roomType"
: chatRoomType,
"userIdList"
: userIDList.join(","),
"roomName"
: newRoomName,
"screenFlg"
: screenFlag,
"isVoice"
: isVoice,
ROOM_TYPE_KEY
: chatRoomType,
USER_ID_LIST_KEY
: userIDList.join(","),
ROOM_NAME_KEY
: newRoomName,
SCREEN_FLAG_KEY
: screenFlag,
IS_VOICE_KEY
: isVoice,
});
}
};
...
...
@@ -2455,4 +2465,4 @@ var updateGroupInfo = function (groupID) {
webkit.messageHandlers.updateGroupInfo.postMessage(groupID);
}
}
}
\ No newline at end of file
};
public_new/js/chat.js
View file @
a1bee735
...
...
@@ -19,9 +19,11 @@ CHAT.saveRoomInfo = function (roomId, roomName) {
CHAT
.
globalLoginParameter
.
roomId
=
roomId
;
CHAT
.
globalLoginParameter
.
roomName
=
roomName
;
if
(
CHAT_UTIL
.
isIOS
())
{
const
ROOM_ID_KEY
=
POST_MESSAGE_KEY
.
ROOM_ID
;
const
ROOM_NAME_KEY
=
POST_MESSAGE_KEY
.
ROOM_NAME
;
webkit
.
messageHandlers
.
roomInfosaveMessageHandlerId
.
postMessage
({
"roomId"
:
roomId
,
"roomName"
:
roomName
,
ROOM_ID_KEY
:
roomId
,
ROOM_NAME_KEY
:
roomName
,
});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
if
(
roomId
==
undefined
&&
roomName
==
undefined
)
{
...
...
public_new/js/constant.js
View file @
a1bee735
...
...
@@ -108,7 +108,7 @@ const SOCKET_KEY = {
REFRESH_USERLIST_INGROUP
:
"refreshUserListInGroup"
,
SHOW_SERVER_ERROR
:
"showServerError"
,
RETRY_JOIN_PROCESS
:
"retryJoinProcess"
,
JOIN
:
"join"
JOIN
:
"join"
,
};
const
NATIVE_KEY_IOS
=
{
...
...
@@ -149,3 +149,17 @@ const NATIVE_KEY_IOS = {
getUserInfo
:
"getUserInfo"
,
getUserListByLoginId
:
"getUserListByLoginId"
,
};
const
POST_MESSAGE_KEY
=
{
COLLABORATION_TYPE
:
"collaborationType"
,
MEETING_ID
:
"meetingId"
,
ROOM_ID
:
"roomId"
,
ROOM_NAME
:
"roomName"
,
USER_ID_LIST
:
"userIdList"
,
GROUP_ID
:
"groupId"
,
ROOM_TYPE
:
"roomType"
,
SCREEN_FLAG
:
"screenFlag"
,
IS_VOICE
:
"isVoice"
,
JOIN_COLLABORATION_TYPE
:
"joinCollaborationType"
,
CHANGE_COLLABORATION_TYPE
:
"changeCollaborationType"
};
public_new/js/share.js
View file @
a1bee735
...
...
@@ -153,9 +153,11 @@ document.addEventListener("DOMContentLoaded", function () {
initCollaborationUI
(
joinCollaborationType
);
if
(
CHAT_UTIL
.
isIOS
())
{
const
JOIN_COLLABORATION_TYPE_KEY
=
POST_MESSAGE_KEY
.
JOIN_COLLABORATION_TYPE
;
const
MEETING_ID_KEY
=
POST_MESSAGE_KEY
.
MEETING_ID
;
webkit
.
messageHandlers
.
joinChangedCollaboration
.
postMessage
({
joinCollaborationType
:
joinCollaborationType
,
meetingId
:
data
.
payload
.
newMeetingId
,
JOIN_COLLABORATION_TYPE_KEY
:
joinCollaborationType
,
MEETING_ID_KEY
:
data
.
payload
.
newMeetingId
,
});
if
(
joinCollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
webkit
.
messageHandlers
.
joinMeetingRoom
.
postMessage
(
...
...
@@ -546,9 +548,11 @@ function changeCollaboration(changeCollaborationType) {
}
penOff
();
if
(
CHAT_UTIL
.
isIOS
())
{
const
CHANGE_COLLABORATION_TYPE_KEY
=
POST_MESSAGE_KEY
.
CHANGE_COLLABORATION_TYPE
;
const
MEETING_ID_KEY
=
POST_MESSAGE_KEY
.
MEETING_ID
;
webkit
.
messageHandlers
.
changeCollaboration
.
postMessage
({
changeCollaborationType
:
changeCollaborationType
,
meetingId
:
newMeetingId
,
CHANGE_COLLABORATION_TYPE_KEY
:
changeCollaborationType
,
MEETING_ID_KEY
:
newMeetingId
,
});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
changeCollaboration
(
changeCollaborationType
,
newMeetingId
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment