Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
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
hewei
wecloud_im_server
Commits
69e690d1
Commit
69e690d1
authored
Dec 20, 2021
by
hweeeeeei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决冲突
parent
fb3b6948
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
common/src/main/java/com/wecloud/im/netty/core/WsReadHandler.java
+3
-3
common/src/main/java/com/wecloud/im/ws/strategy/concrete/ImChatConcrete.java
+0
-2
No files found.
common/src/main/java/com/wecloud/im/netty/core/WsReadHandler.java
View file @
69e690d1
package
com
.
wecloud
.
im
.
netty
.
core
;
import
cn.hutool.core.thread.ThreadFactoryBuilder
;
import
com.wecloud.im.executor.BusinessThreadPool
;
import
com.wecloud.im.ws.model.WsConstants
;
import
com.wecloud.im.ws.receive.ReadWsData
;
import
com.wecloud.im.ws.service.MangerChannelService
;
...
...
@@ -153,7 +154,7 @@ public class WsReadHandler extends SimpleChannelInboundHandler<TextWebSocketFram
@Override
public
void
handlerAdded
(
ChannelHandlerContext
ctx
)
{
String
userIdByChannel
=
mangerChannelService
.
getInfoByChannel
(
ctx
);
String
userIdByChannel
=
mangerChannelService
.
get
String
InfoByChannel
(
ctx
);
log
.
info
(
"连接WS成功handlerAdded,uid:"
+
userIdByChannel
+
","
+
",channelId:"
+
ctx
.
channel
().
id
().
asLongText
());
}
...
...
@@ -179,11 +180,10 @@ public class WsReadHandler extends SimpleChannelInboundHandler<TextWebSocketFram
String
appKey
=
ctx
.
channel
().
attr
(
MangerChannelService
.
APP_KEY
).
get
();
String
clientId
=
ctx
.
channel
().
attr
(
MangerChannelService
.
CLIENT_ID
).
get
();
String
userIdByChannel
=
mangerChannelService
.
getInfoByChannel
(
ctx
);
String
userIdByChannel
=
mangerChannelService
.
get
String
InfoByChannel
(
ctx
);
log
.
info
(
"uid:"
+
userIdByChannel
+
","
+
"handlerRemoved"
+
",channelId:"
+
ctx
.
channel
().
id
().
asLongText
());
// 关掉连接
mangerChannelService
.
offline
(
ctx
);
ctx
.
close
();
// rtc清空缓存
rtcService
.
clientOffline
(
appKey
,
clientId
);
...
...
common/src/main/java/com/wecloud/im/ws/strategy/concrete/ImChatConcrete.java
View file @
69e690d1
...
...
@@ -139,8 +139,6 @@ public class ImChatConcrete extends ImCmdAbstract {
// 生成消息id
long
messageId
=
SnowflakeUtil
.
getId
();
// 入库 保存消息至消息表
ImMessage
imMessage
=
saveImMessage
(
imApplication
,
imClientSender
,
toConversationId
,
messageId
,
content
);
// 保存消息至消息表
ImMessage
imMessage
=
imMessageService
.
saveImMessage
(
imApplication
,
imClientSender
,
toConversationId
,
messageId
,
content
);
// 封装响应的实体
...
...
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