Commit 5f7a9ec5 by 罗长华

撤回消息时进行消息路由

parent a27a28d0
...@@ -256,16 +256,20 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes ...@@ -256,16 +256,20 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes
if (messageById.getWithdraw()) { if (messageById.getWithdraw()) {
return Boolean.TRUE; return Boolean.TRUE;
} }
ImClient msgOwner = imClientService.getCacheImClient(messageById.getSender());
if (msgOwner == null) {
throw new BusinessException("未查找到消息发送者");
}
eventPublisher.publishEvent(new ClientSendMessageEvent(imApplication.getId(), messageById));
// 修改消息体 // 修改消息体
messageById.setWithdraw(Boolean.TRUE); messageById.setWithdraw(Boolean.TRUE);
messageById.setWithdrawTime(new Date()); messageById.setWithdrawTime(new Date());
// 清空消息 // 清空消息
messageById.setContent("{}"); messageById.setContent("{}");
boolean saveOk = this.updateById(messageById); boolean saveOk = this.updateById(messageById);
ImClient msgOwner = imClientService.getCacheImClient(messageById.getSender());
if (msgOwner == null) {
throw new BusinessException("未查找到消息发送者");
}
if (saveOk) { if (saveOk) {
// 查询该会话所有成员 // 查询该会话所有成员
......
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