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
26287cf0
Commit
26287cf0
authored
May 16, 2022
by
罗长华
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/xiaohudou_20220427' into xiaohudou_20220427
parents
a57a9de4
2f5e087c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
core/src/main/java/com/wecloud/im/service/impl/ImClientLoginServiceImpl.java
+0
-1
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
+4
-7
No files found.
core/src/main/java/com/wecloud/im/service/impl/ImClientLoginServiceImpl.java
View file @
26287cf0
...
@@ -135,7 +135,6 @@ public class ImClientLoginServiceImpl implements ImClientLoginService {
...
@@ -135,7 +135,6 @@ public class ImClientLoginServiceImpl implements ImClientLoginService {
ImClient
client
=
imClientService
.
getOne
(
new
QueryWrapper
<
ImClient
>().
lambda
()
ImClient
client
=
imClientService
.
getOne
(
new
QueryWrapper
<
ImClient
>().
lambda
()
.
eq
(
ImClient:
:
getFkAppid
,
appId
)
.
eq
(
ImClient:
:
getFkAppid
,
appId
)
.
eq
(
ImClient:
:
getClientId
,
clientId
));
.
eq
(
ImClient:
:
getClientId
,
clientId
));
;
if
(
client
==
null
)
{
if
(
client
==
null
)
{
client
=
new
ImClient
();
client
=
new
ImClient
();
...
...
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
View file @
26287cf0
...
@@ -941,7 +941,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -941,7 +941,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
for
(
ImClient
receiver
:
clientReceivers
)
{
for
(
ImClient
receiver
:
clientReceivers
)
{
// 投递消息
// 投递消息
try
{
try
{
couriers
.
deliver
(
imMessage
,
null
,
currentClient
,
receiver
,
WsResponseCmdEnum
.
CONVERSATION_EVENT_MSG
);
couriers
.
deliver
(
imMessage
,
contentMap
,
currentClient
,
receiver
,
WsResponseCmdEnum
.
CONVERSATION_EVENT_MSG
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"下发群会话事件失败,事件类型 {} 接收人 {}"
,
imMessage
.
getMsgType
(),
JSON
.
toJSONString
(
receiver
));
log
.
info
(
"下发群会话事件失败,事件类型 {} 接收人 {}"
,
imMessage
.
getMsgType
(),
JSON
.
toJSONString
(
receiver
));
}
}
...
@@ -1198,13 +1198,11 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -1198,13 +1198,11 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
}
}
// 修改群成员数量
imConversationMapper
.
addMemberCount
(
imApplication
.
getId
(),
param
.
getChatRoomId
(),
1
);
chatRoomCacheManager
.
intoRoom
(
clientToConversation
.
getId
(),
param
.
getChatRoomId
(),
param
.
getPlatform
());
chatRoomCacheManager
.
intoRoom
(
clientToConversation
.
getId
(),
param
.
getChatRoomId
(),
param
.
getPlatform
());
// ws邀请事件通知给群内其他人 ----------
// ws邀请事件通知给群内其他人 ----------
// 生成消息id
long
messageId
=
SnowflakeUtil
.
getId
();
Map
<
String
,
Object
>
content
=
new
HashMap
<>();
Map
<
String
,
Object
>
content
=
new
HashMap
<>();
content
.
put
(
"operator"
,
imClientSender
.
getClientId
());
//操作的client ID
content
.
put
(
"operator"
,
imClientSender
.
getClientId
());
//操作的client ID
content
.
put
(
"passivityOperator"
,
clientToConversation
.
getClientId
());
//被操作的client ID
content
.
put
(
"passivityOperator"
,
clientToConversation
.
getClientId
());
//被操作的client ID
...
@@ -1212,7 +1210,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -1212,7 +1210,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
ImMessage
imMessage
=
MessageBuilder
.
buildEventMessage
(
MsgTypeEnum
.
INVITE_CLIENT_JOIN_CONVERSATION
,
imApplication
,
imClientSender
,
imConversation
,
""
);
ImMessage
imMessage
=
MessageBuilder
.
buildEventMessage
(
MsgTypeEnum
.
INVITE_CLIENT_JOIN_CONVERSATION
,
imApplication
,
imClientSender
,
imConversation
,
""
);
imMessage
.
setContent
(
JsonUtils
.
encodeJson
(
content
));
imMessage
.
setContent
(
JsonUtils
.
encodeJson
(
content
));
imMessage
.
setId
(
messageId
);
imMessage
.
setId
(
SnowflakeUtil
.
getId
()
);
imMessage
.
setMsgType
(
MsgTypeEnum
.
INVITE_CLIENT_JOIN_CONVERSATION
.
getUriCode
());
imMessage
.
setMsgType
(
MsgTypeEnum
.
INVITE_CLIENT_JOIN_CONVERSATION
.
getUriCode
());
imMessage
.
setCreateTime
(
new
Date
());
imMessage
.
setCreateTime
(
new
Date
());
imMessage
.
setFkAppid
(
imApplication
.
getId
());
imMessage
.
setFkAppid
(
imApplication
.
getId
());
...
@@ -1270,7 +1268,6 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -1270,7 +1268,6 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
chatRoomCacheManager
.
exitRoom
(
currentClient
.
getId
(),
param
.
getChatRoomId
(),
param
.
getPlatform
());
chatRoomCacheManager
.
exitRoom
(
currentClient
.
getId
(),
param
.
getChatRoomId
(),
param
.
getPlatform
());
// ws 退出事件通知给房间内其他人 ----------
// ws 退出事件通知给房间内其他人 ----------
// 生成消息id
ImMessage
imMessage
=
MessageBuilder
.
buildEventMessage
(
MsgTypeEnum
.
LEAVE_CONVERSATION
,
imApplication
,
currentClient
,
imConversation
,
""
);
ImMessage
imMessage
=
MessageBuilder
.
buildEventMessage
(
MsgTypeEnum
.
LEAVE_CONVERSATION
,
imApplication
,
currentClient
,
imConversation
,
""
);
// 遍历发送给已在群内的成员
// 遍历发送给已在群内的成员
List
<
Long
>
fkClientIds
=
chatRoomMembers
.
keySet
().
stream
().
map
(
key
->
Long
.
valueOf
(
key
.
split
(
RedisUtils
.
SPLIT
)[
0
])).
collect
(
Collectors
.
toList
());
List
<
Long
>
fkClientIds
=
chatRoomMembers
.
keySet
().
stream
().
map
(
key
->
Long
.
valueOf
(
key
.
split
(
RedisUtils
.
SPLIT
)[
0
])).
collect
(
Collectors
.
toList
());
...
...
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