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
5a7afa22
Commit
5a7afa22
authored
May 19, 2022
by
罗长华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Group leave时,如果是本人,下发离开事件
parent
1cf953ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
core/src/main/java/com/wecloud/im/service/impl/ImGroupServiceImpl.java
+17
-7
No files found.
core/src/main/java/com/wecloud/im/service/impl/ImGroupServiceImpl.java
View file @
5a7afa22
...
@@ -282,13 +282,23 @@ public class ImGroupServiceImpl implements ImGroupService {
...
@@ -282,13 +282,23 @@ public class ImGroupServiceImpl implements ImGroupService {
for
(
ImConversationMembers
members
:
existMemberList
)
{
for
(
ImConversationMembers
members
:
existMemberList
)
{
// 操作的client ID
// 操作的client ID
Map
<
String
,
Object
>
content
=
new
HashMap
<>();
Map
<
String
,
Object
>
content
=
new
HashMap
<>();
content
.
put
(
"operator"
,
operator
.
getClientId
());
if
(
members
.
getClientId
().
equals
(
operator
.
getClientId
()))
{
// 被操作的client ID
content
.
put
(
"operator"
,
operator
.
getClientId
());
content
.
put
(
"passivityOperator"
,
members
.
getClientId
());
// 自己主动退出
ImMessage
imMessage
=
MessageBuilder
.
buildEventMessage
(
MsgTypeEnum
.
REMOVE_CLIENT_CONVERSATION
,
imApplication
,
operator
,
conversation
,
JsonUtils
.
encodeJson
(
content
));
ImMessage
imMessage
=
MessageBuilder
.
buildEventMessage
(
MsgTypeEnum
.
LEAVE_CONVERSATION
,
imApplication
,
operator
,
conversation
,
JsonUtils
.
encodeJson
(
content
));
imMessageService
.
save
(
imMessage
);
imMessageService
.
save
(
imMessage
);
// 发送给在群内的成员
// 发送给在群内的成员
conversationService
.
sendMsgToMembers
(
conversation
,
membersList
,
operator
,
imMessage
,
content
);
conversationService
.
sendMsgToMembers
(
conversation
,
membersList
,
operator
,
imMessage
,
content
);
}
else
{
content
.
put
(
"operator"
,
operator
.
getClientId
());
// 被操作的client ID
content
.
put
(
"passivityOperator"
,
members
.
getClientId
());
ImMessage
imMessage
=
MessageBuilder
.
buildEventMessage
(
MsgTypeEnum
.
REMOVE_CLIENT_CONVERSATION
,
imApplication
,
operator
,
conversation
,
JsonUtils
.
encodeJson
(
content
));
imMessageService
.
save
(
imMessage
);
// 发送给在群内的成员
conversationService
.
sendMsgToMembers
(
conversation
,
membersList
,
operator
,
imMessage
,
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