mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
✨ #1217 小程序增加校验图片/音频是否含有违法违规内容的接口
* 添加 微信内容异步检测接口 * 消息route 增加 title 参数
This commit is contained in:
@@ -32,6 +32,8 @@ public class WxMaMessageRouterRule {
|
||||
|
||||
private String rContent;
|
||||
|
||||
private String title;
|
||||
|
||||
private WxMaMessageMatcher matcher;
|
||||
|
||||
private boolean reEnter = false;
|
||||
@@ -60,6 +62,16 @@ public class WxMaMessageRouterRule {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 标题,发送小程序页卡时有效
|
||||
* @param title
|
||||
* @return
|
||||
*/
|
||||
public WxMaMessageRouterRule title(String title){
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果event等于某值.
|
||||
*/
|
||||
@@ -100,6 +112,8 @@ public class WxMaMessageRouterRule {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 如果消息匹配某个matcher,用在用户需要自定义更复杂的匹配规则的时候.
|
||||
*/
|
||||
@@ -164,6 +178,8 @@ public class WxMaMessageRouterRule {
|
||||
return end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 将微信自定义的事件修正为不区分大小写.
|
||||
* 比如框架定义的事件常量为click,但微信传递过来的却是CLICK
|
||||
@@ -183,6 +199,9 @@ public class WxMaMessageRouterRule {
|
||||
.matches(this.rContent, wxMessage.getContent() == null ? "" : wxMessage.getContent().trim()))
|
||||
&&
|
||||
(this.matcher == null || this.matcher.match(wxMessage))
|
||||
&&
|
||||
(this.title == null || this.title
|
||||
.equals(wxMessage.getTitle() == null ? null : wxMessage.getTitle().trim()))
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user