Commit be6d45dd by Future

系统消息推送添加是否屏蔽消息过滤

parent 72bf9ae6
...@@ -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);
}
} }
} }
......
...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment