You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
简要描述
在企微第三方回调接口使用消息路由时发现,当加好友回调消息的创建时间一样,但外部联系人不同,企微用户也不同时会被判断为重复消息,导致没有进入到后续的handle,造成该客户的相关业务未能处理。
模块版本情况
详细描述
Class: me.chanjar.weixin.cp.tp.message.WxCpTpMessageRouter
Mehtod: isMsgDuplicated()
`private boolean isMsgDuplicated(WxCpTpXmlMessage wxMessage) {
StringBuilder messageId = new StringBuilder();
if (wxMessage.getInfoType() != null) {
messageId.append(wxMessage.getInfoType())
.append("-").append(StringUtils.trimToEmpty(wxMessage.getSuiteId()))
.append("-").append(wxMessage.getTimeStamp())
.append("-").append(StringUtils.trimToEmpty(wxMessage.getAuthCorpId()))
.append("-").append(StringUtils.trimToEmpty(wxMessage.getUserID()))
.append("-").append(StringUtils.trimToEmpty(wxMessage.getChangeType()))
.append("-").append(StringUtils.trimToEmpty(wxMessage.getServiceCorpId()))
.append("-").append(StringUtils.trimToEmpty(wxMessage.getExternalUserID()));
}
}`
在加好友回调中,InfoType为空,MsgID为空会进入到如图所示的逻辑中,此处createTime和FromUserName是相同的,而Event必定也是相同的,eventKey为空。所以会判定为重复消息,此处的messageId应加上ExternalUserID和userID作为唯一判定的key。
The text was updated successfully, but these errors were encountered: