WeiXinMPSDK icon indicating copy to clipboard operation
WeiXinMPSDK copied to clipboard

小程序缺少内容安全回调:wxa_media_check

Open wiiline opened this issue 1 year ago • 1 comments

此版块专为反馈 bug 及提交需求服务,不负责解答开发问题,请勿发表开发问题, 如果您需要这方面的帮助,请移步问答社区:https://weixin.senparc.com/QA

问题描述

小程序回调类型缺少wxa_media_check,主要用于社交类小程序媒体类型信息审核要求。

重现问题步骤(如果可以)
  1. ...
  2. ...
微信官方文档 URL

https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html

微信官方文档快照(直接复制关键内容到下方)

security.mediaCheckAsync 本接口应在服务器端调用,详细说明参见服务端API

本接口支持云调用。需开发者工具版本 >= 1.02.1904090(最新稳定版下载),wx-server-sdk >= 0.4.0

异步校验图片/音频是否含有违法违规内容。

1.0 版本异步接口文档【点击查看】, 1.0 版本同步接口文档【点击查看】,1.0版本在2021年9月1日停止更新,请尽快更新至2.0

应用场景举例:

语音风险识别:社交类用户发表的语音内容检测; 图片智能鉴黄:涉及拍照的工具类应用(如美拍,识图类应用)用户拍照上传检测;电商类商品上架图片检测;媒体类用户文章里的图片检测等; 敏感人脸识别:用户头像;媒体类用户文章里的图片检测;社交类用户上传的图片检测等。 频率限制:单个 appId 调用上限为 2000 次/分钟,200,000 次/天;文件大小限制:单个文件大小不超过10M

发现问题的模块
  • [ ] Senparc.Weixin 版本:
  • [ ] Senparc.Weixin.MP 版本:
  • [ ] Senparc.Weixin.MP.MVC 版本:
  • [ ] Senparc.Weixin.Open 版本: ~- [ ] Senparc.Weixin.QY 版本:~
  • [ ] Senparc.Weixin.Work 版本:
  • [ ] Senparc.Weixin.WxOpen 版本:最新版本
  • [ ] Senparc.Weixin.Cache.Redis 版本:
  • [ ] Senparc.Weixin.Cache.Memcached 版本:
  • [ ] Senparc.Weixin.Tenpay 版本:
  • [ ] Senparc.WebSocket 版本:
  • [ ] 其他模块:
模块对应的 .net 版本
  • [ ] .net 3.5
  • [ ] .net 4.0
  • [ ] .net 4.5+
  • [ ] .net standard 2.0 / 2.1
  • [ ] .net core 1.x
  • [ ] .net core 2.x
  • [ ] .net core 3.x
  • [x] .net 5.x / 6.x
开发环境
  • [ ] Visual Studio 2019
  • [x] Visual Studio 2022
  • [ ] Visual Studio Code
  • [ ] 其他:
缓存环境
  • [x] 服务器内存缓存(默认)
  • [ ] Redis 版本:
  • [ ] Memcached 版本:
  • [ ] 其他:
系统环境
  • [x] Windows,版本:
  • [ ] Linux,版本:
  • [ ] Mac,版本:
  • [ ] 其他:
联系方式

Email:

(也可将问题地址及联系方式发送到 [email protected]

发布问题后,请保持对 issue 的关注,有时会有需要进一步沟通的信息,很长时间内没有得到答复的 issue 将被关闭。

wiiline avatar Aug 02 '22 11:08 wiiline

@wiiline 非常感谢!已经发布接口,并添加消息回调处理机制。

发起接口:

https://github.com/JeffreySu/WeiXinMPSDK/blob/b5adf3eb490ce22962a7a81338f23b35fb9538d5/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs#L628-L628

发起接口单元测试:

https://github.com/JeffreySu/WeiXinMPSDK/blob/b5adf3eb490ce22962a7a81338f23b35fb9538d5/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/WxApp/WxAppApiTests.cs#L172-L172

回调示例:

https://github.com/JeffreySu/WeiXinMPSDK/blob/b5adf3eb490ce22962a7a81338f23b35fb9538d5/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs#L235-L235

回调单元测试:

https://github.com/JeffreySu/WeiXinMPSDK/blob/b5adf3eb490ce22962a7a81338f23b35fb9538d5/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/MessageHandlers/MessageHandlerTests.cs#L45-L45

JeffreySu avatar Aug 08 '22 15:08 JeffreySu