#1217 小程序增加校验图片/音频是否含有违法违规内容的接口

* 添加 微信内容异步检测接口

* 消息route 增加 title 参数
This commit is contained in:
Boris
2019-09-27 11:56:03 +08:00
committed by Binary Wang
parent 779f1d08a9
commit 8e97b778f3
6 changed files with 103 additions and 10 deletions

View File

@@ -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()))
;
}