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
be6d45dd
Commit
be6d45dd
authored
Sep 26, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统消息推送添加是否屏蔽消息过滤
parent
72bf9ae6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
core/src/main/java/com/wecloud/im/action/NormalChatAction.java
+6
-4
core/src/main/java/com/wecloud/im/mq/MqSender.java
+0
-5
No files found.
core/src/main/java/com/wecloud/im/action/NormalChatAction.java
View file @
be6d45dd
...
@@ -185,10 +185,12 @@ public class NormalChatAction {
...
@@ -185,10 +185,12 @@ public class NormalChatAction {
// 在线用户直接发消息
// 在线用户直接发消息
sendMsgForOnline
(
imClientReceiver
.
getId
(),
imMessageOnlineSend
);
sendMsgForOnline
(
imClientReceiver
.
getId
(),
imMessageOnlineSend
);
// 异步推送系统通知消息
if
(!
conversationMembers
.
getDoNotDisturb
())
{
PushDTO
pushDTO
=
mqSender
.
buildPushDto
(
data
.
getPush
(),
imClientReceiver
,
imApplication
);
// 异步推送系统通知消息
if
(
pushDTO
!=
null
)
{
PushDTO
pushDTO
=
mqSender
.
buildPushDto
(
data
.
getPush
(),
imClientReceiver
,
imApplication
);
mqSender
.
orderSend
(
MqConstant
.
Topic
.
IM_ORDER_MSG_TOPIC
,
MqConstant
.
Tag
.
IM_ORDER_MSG_TAG
,
pushDTO
);
if
(
pushDTO
!=
null
)
{
mqSender
.
orderSend
(
MqConstant
.
Topic
.
IM_ORDER_MSG_TOPIC
,
MqConstant
.
Tag
.
IM_ORDER_MSG_TAG
,
pushDTO
);
}
}
}
}
}
...
...
core/src/main/java/com/wecloud/im/mq/MqSender.java
View file @
be6d45dd
...
@@ -52,9 +52,7 @@ public class MqSender {
...
@@ -52,9 +52,7 @@ public class MqSender {
* @return
* @return
*/
*/
public
SendResult
synSend
(
String
topic
,
String
tag
,
PushDTO
pushDTO
)
{
public
SendResult
synSend
(
String
topic
,
String
tag
,
PushDTO
pushDTO
)
{
log
.
info
(
"mq同步推送topic: {} tag: {} 推送内容: {}"
,
topic
,
tag
,
JSON
.
toJSONString
(
pushDTO
));
SendResult
sendResult
=
rocketMqProducerService
.
synSend
(
topic
,
tag
,
JSON
.
toJSONString
(
pushDTO
));
SendResult
sendResult
=
rocketMqProducerService
.
synSend
(
topic
,
tag
,
JSON
.
toJSONString
(
pushDTO
));
log
.
info
(
"mq同步推送topic: {} tag: {} 返回结果: {}"
,
topic
,
tag
,
JSON
.
toJSONString
(
sendResult
));
return
sendResult
;
return
sendResult
;
}
}
...
@@ -67,7 +65,6 @@ public class MqSender {
...
@@ -67,7 +65,6 @@ public class MqSender {
* @return
* @return
*/
*/
public
void
sendAsync
(
String
topic
,
String
tag
,
PushDTO
pushDTO
)
{
public
void
sendAsync
(
String
topic
,
String
tag
,
PushDTO
pushDTO
)
{
log
.
info
(
"mq异步推送topic: {} tag: {} 推送内容: {}"
,
topic
,
tag
,
JSON
.
toJSONString
(
pushDTO
));
rocketMqProducerService
.
sendAsyncDefault
(
topic
,
tag
,
JSON
.
toJSONString
(
pushDTO
));
rocketMqProducerService
.
sendAsyncDefault
(
topic
,
tag
,
JSON
.
toJSONString
(
pushDTO
));
}
}
...
@@ -81,9 +78,7 @@ public class MqSender {
...
@@ -81,9 +78,7 @@ public class MqSender {
*/
*/
public
SendResult
orderSend
(
String
topic
,
String
tag
,
PushDTO
pushDTO
)
{
public
SendResult
orderSend
(
String
topic
,
String
tag
,
PushDTO
pushDTO
)
{
try
{
try
{
log
.
info
(
"mq按顺序发送topic: {} tag: {} 推送内容: {}"
,
topic
,
tag
,
JSON
.
toJSONString
(
pushDTO
));
SendResult
sendResult
=
rocketMqProducerService
.
orderSend
(
topic
,
tag
,
JSON
.
toJSONString
(
pushDTO
),
1
);
SendResult
sendResult
=
rocketMqProducerService
.
orderSend
(
topic
,
tag
,
JSON
.
toJSONString
(
pushDTO
),
1
);
log
.
info
(
"mq按顺序发送topic: {} tag: {} 返回结果: {}"
,
topic
,
tag
,
JSON
.
toJSONString
(
sendResult
));
return
sendResult
;
return
sendResult
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"发送通知栏消息异常 "
,
e
);
log
.
info
(
"发送通知栏消息异常 "
,
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