-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
监听事件时不区分 $target(监听所有event和message) #3
Comments
@zerozh 麻烦说清楚一点,没太看明白 |
@zerozh 明白了 |
@zerozh 可是那样的话,就没办法指定监听某一类了?而是把这个类型筛选完全交给用户来实现了? |
@overtrue 这样做有两个好处:为了方便统一记录日志;方便高级用户完全自定义类型筛选 |
@zerozh 像下面这样? $response = $wechat->serve(function($message){
switch($message->MsgType) {
case 'event':
// handle event
break;
case 'message' :
// handle message
break;
}
});
return $response; |
Closed
Closed
Closed
Closed
This was referenced Aug 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
用作日志监控等
也可以方便以后微信拓展新的msgtype类型
The text was updated successfully, but these errors were encountered: