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
7cecb9a1
Commit
7cecb9a1
authored
Jul 30, 2021
by
Kim Eunchul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#43695 ウェブソケットの送信方式変更
parent
2386e61d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
public_new/js/sockets/chat-websocket-message.js
+8
-6
No files found.
public_new/js/sockets/chat-websocket-message.js
View file @
7cecb9a1
...
...
@@ -10,15 +10,15 @@ CHAT_SOCKET.bindOnNewMessage = function () {
});
};
var
handleMessage
=
function
(
message
,
roomName
,
socketKey
)
{
CHAT_SOCKET
.
handleMessage
=
function
(
message
,
roomName
,
socketKey
)
{
const
systemMessageTemplate
=
getTemplate
(
TemplateURL
.
SYSTEM_MESSAGE
);
const
unwrappedMessageInfo
=
decodeMessage
(
message
.
text
);
const
unwrappedMessageInfo
=
CHAT_SOCKET
.
decodeMessage
(
message
.
text
);
if
(
unwrappedMessageInfo
==
DATA_MESSAGE_SCHEME
+
FINISH_ALL_COLLABORATION_SIGNAL
)
{
cleanUpCollaborationMessage
();
CHAT_SOCKET
.
cleanUpCollaborationMessage
();
return
;
}
...
...
@@ -29,7 +29,7 @@ var handleMessage = function (message, roomName, socketKey) {
if
(
messageType
==
SOCKET_KEY
.
NEW_COMMUNICATION
)
{
addCollaborationMessage
(
CHAT_SOCKET
.
addCollaborationMessage
(
messageInfo
,
message
.
userId
,
roomName
,
...
...
@@ -37,7 +37,7 @@ var handleMessage = function (message, roomName, socketKey) {
message
.
createdAt
);
}
else
{
addTextMessage
(
messageText
,
message
,
socket
.
id
);
CHAT_SOCKET
.
addTextMessage
(
messageText
,
message
,
socket
.
id
);
}
if
(
typeof
ChatRoom
!==
"undefined"
)
{
...
...
@@ -45,10 +45,12 @@ var handleMessage = function (message, roomName, socketKey) {
setTimeout
(
function
()
{
ChatRoom
.
scrollToBottom
();
},
300
);
}
else
{
Common
.
dismissLoadingIndicator
();
}
}
var
decodeMessage
=
function
(
text
)
{
CHAT_SOCKET
.
decodeMessage
=
function
(
text
)
{
try
{
return
decodeURIComponent
(
text
);
}
catch
(
e
)
{
...
...
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