Commit f1f47181 by Kim Peace

Merge branch 'squash/socket_kim-ec' into 'develop'

Squash/socket kim ec

See merge request !228
parents ca5452d0 b4c29715
......@@ -5,12 +5,12 @@ CHAT_SOCKET.bindOnNewMessage = function () {
CHAT_SOCKET.handleMessage(message, roomName, SOCKET_KEY.NEW_MESSAGE);
});
socket.on(SOCKET_KEY.NEW_COMMUNICATION, function (message, roomID, roomName) {
CHAT_SOCKET.handleMessage(message, roomName, SOCKET_KEY.NEW_COMMUNICATION);
socket.on(SOCKET_KEY.NEW_COMMUNICATION, function (message, roomID, roomName, collaborationType, meetingID) {
CHAT_SOCKET.handleMessage(message, roomName, SOCKET_KEY.NEW_COMMUNICATION, collaborationType, meetingID);
});
};
CHAT_SOCKET.handleMessage = function (message, roomName, socketKey) {
CHAT_SOCKET.handleMessage = function (message, roomName, socketKey, collaborationType = null, meetingID = null) {
const systemMessageTemplate = getTemplate(TemplateURL.SYSTEM_MESSAGE);
const unwrappedMessageInfo = CHAT_SOCKET.decodeMessage(message.text);
......@@ -36,7 +36,9 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey) {
message.userId,
roomName,
message.insertDate,
message.createdAt
message.createdAt,
collaborationType,
meetingID
);
} else {
CHAT_SOCKET.addTextMessage(messageText, message, socket.id);
......@@ -65,10 +67,12 @@ CHAT_SOCKET.addCollaborationMessage = function (
userID,
roomName,
insertDate,
createdAt
createdAt,
collaborationTypeInfo,
meetingIDInfo
) {
const collaborationType = CHAT_UTIL.getCollaborationType(messageInfo[2]);
const meetingID = CHAT_SOCKET.getMeetingID(collaborationType, messageInfo);
const collaborationType = collaborationTypeInfo;
const meetingID = meetingIDInfo;
const userInCollaboration = JSON.parse(
NativeBridgeDataSource.getUserInfoList(userID)
);
......
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