Skip to content

Commit

Permalink
Openwx消息过滤参数post_message_filter相关文档更新
Browse files Browse the repository at this point in the history
  • Loading branch information
hexsum committed Apr 8, 2019
1 parent 2cfdf30 commit 7c760a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,16 @@ $client->load("Openwx",data=>{

当接收到消息时,会把消息通过JSON格式数据POST到该接口

可以在Openwx插件中,通过 post_message_filter 参数来过滤上报的消息内容, 支持对消息中的任意多个属性进行过滤

```
$client->load("Openwx",data=>{
listen => [{host=>xxx,port=>xxx}], #可选,发送消息api监听端口
post_api=> 'http://127.0.0.1:3000/post_api', #可选,接收消息或事件的上报地址
post_message_filter => {class => "recv", "type" => "friend_message",format=>"app",sender_name=>"微信支付"},#仅上报微信支付消息
});
```

普通好友消息或群消息上报

```
Expand Down
1 change: 1 addition & 0 deletions doc/Weixin.pod
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,7 @@ CPAN文档可能比较旧或者表达的信息不够丰富,请参考github上A
post_stdout => 0, #可选,上报数据是否打印到stdout,适合管道交互信息方式,默认0
post_media_data => 1, #可选,是否上报经过base64编码的图片原始数据,默认值为1
post_event_list => ['login','stop','state_change','input_qrcode'], #可选,上报事件列表
#post_message_filter => {class => "recv", "type" => "friend_message",format=>"app",sender_name=>"微信支付"},#消息过滤
#poll_api => 'http://xxxx', #可选,从外网调用内网程序的api时需要使用到,默认不启用
#poll_interval => 5, #可选,长轮询请求间隔,默认5s
});
Expand Down

0 comments on commit 7c760a2

Please sign in to comment.