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
cf23f918
Commit
cf23f918
authored
Oct 14, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单人消息推送是否包含自己调整
parent
ac0fdde9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
core/src/main/java/com/wecloud/im/service/impl/ImMessageServiceImpl.java
+10
-8
No files found.
core/src/main/java/com/wecloud/im/service/impl/ImMessageServiceImpl.java
View file @
cf23f918
...
...
@@ -761,7 +761,7 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes
Map
<
Long
,
ImConversation
>
conversationMapGroupById
=
new
HashMap
<>();
Map
<
Long
,
List
<
ImConversationMembers
>>
conMembersMapGroupByConId
=
new
HashMap
<>();
beforePublishPrivateMessage
(
application
,
sender
,
toUserIdList
,
conversationMapGroupById
,
conMembersMapGroupByConId
);
beforePublishPrivateMessage
(
application
,
sender
,
toUserIdList
,
conversationMapGroupById
,
conMembersMapGroupByConId
,
param
.
getIncludeSender
()
);
// 开始发送消息
conversationMapGroupById
.
forEach
((
conversationId
,
conversation
)
->
{
List
<
ImConversationMembers
>
membersList
=
conMembersMapGroupByConId
.
getOrDefault
(
conversationId
,
...
...
@@ -810,7 +810,7 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes
Map
<
Long
,
ImConversation
>
conversationMapGroupById
=
new
HashMap
<>();
Map
<
Long
,
List
<
ImConversationMembers
>>
conMembersMapGroupByConId
=
new
HashMap
<>();
beforePublishPrivateMessage
(
application
,
sender
,
toUserIdList
,
conversationMapGroupById
,
conMembersMapGroupByConId
);
beforePublishPrivateMessage
(
application
,
sender
,
toUserIdList
,
conversationMapGroupById
,
conMembersMapGroupByConId
,
param
.
getIncludeSender
()
);
// 开始发送消息
conversationMapGroupById
.
forEach
((
conversationId
,
conversation
)
->
{
List
<
ImConversationMembers
>
membersList
=
conMembersMapGroupByConId
.
getOrDefault
(
conversationId
,
...
...
@@ -860,7 +860,7 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes
param
.
getConversationExt
().
setChatType
(
ChatTypeEnum
.
SYSTEM
);
}
beforePublishPrivateMessage
(
application
,
sender
,
toUserIdList
,
param
.
getConversationExt
(),
conversationMapGroupById
,
conMembersMapGroupByConId
);
conversationMapGroupById
,
conMembersMapGroupByConId
,
false
);
// 开始发送消息
conversationMapGroupById
.
forEach
((
conversationId
,
conversation
)
->
{
...
...
@@ -911,8 +911,8 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes
ImClient
sender
,
List
<
String
>
toUserIdList
,
Map
<
Long
,
ImConversation
>
conversationMapGroupById
,
Map
<
Long
,
List
<
ImConversationMembers
>>
conMembersMapGroupByConId
)
{
this
.
beforePublishPrivateMessage
(
application
,
sender
,
toUserIdList
,
null
,
conversationMapGroupById
,
conMembersMapGroupByConId
);
Map
<
Long
,
List
<
ImConversationMembers
>>
conMembersMapGroupByConId
,
Boolean
includeSender
)
{
this
.
beforePublishPrivateMessage
(
application
,
sender
,
toUserIdList
,
null
,
conversationMapGroupById
,
conMembersMapGroupByConId
,
includeSender
);
}
/**
...
...
@@ -932,10 +932,12 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes
List
<
String
>
toUserIdList
,
ConversationExtParam
conversationExt
,
Map
<
Long
,
ImConversation
>
conversationMapGroupById
,
Map
<
Long
,
List
<
ImConversationMembers
>>
conMembersMapGroupByConId
)
{
Map
<
Long
,
List
<
ImConversationMembers
>>
conMembersMapGroupByConId
,
Boolean
includeSender
)
{
// 排除发件人自己
toUserIdList
=
toUserIdList
.
stream
().
filter
(
userId
->
!
sender
.
getClientId
().
equals
(
userId
)).
collect
(
Collectors
.
toList
());
if
(!
includeSender
)
{
// 排除发件人自己
toUserIdList
=
toUserIdList
.
stream
().
filter
(
userId
->
!
sender
.
getClientId
().
equals
(
userId
)).
collect
(
Collectors
.
toList
());
}
Long
appId
=
application
.
getId
();
// 获取收件人信息
...
...
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