Comments (4)
我猜这个报错的意思是就算你返回了消息,用户也收不到了(因为退订了)
所以如果你直接返回空字符串应该可以避免这个错误。
class WechatsController < ApplicationController
wechat_responder
# 当用户取消关注订阅
on :event, with: 'unsubscribe' do |request|
request.reply.text ""
end
end
from wechat.
是的 这个问题并不会对我们的服务造成任何困扰,并且得益于它的报警我们可以在发完一次推送消息以后很快的发现是否有大量掉粉
如果不写 request.reply.text
返回的应该也是空字串吧,这样做依然会有报错,周末我会试着排查一下,如果没有什么发现我就返回空字串试试,由于要大量掉粉才能触发,再现难度比较大
from wechat.
目前版本不能不写request.reply.text
。我又仔细看了一下微信文档,应该整个返回空,让我再改改看。
from wechat.
v0.6.4已经修正,现在可以这样写,满足微信要求:
class WechatsController < ApplicationController
wechat_responder
# 当用户取消关注订阅
on :event, with: 'unsubscribe' do |request|
request.reply.success # user can not receive this message
end
end
from wechat.
Related Issues (20)
- 临时素材无法获取 HOT 3
- 配置文件的token指的是什么? HOT 1
- wechat_api 接口对自定义小程序配置无法正确读取 HOT 8
- 微信公众平台问题 HOT 11
- 获取Ticket错误,Wechat::ResponseError - api unauthorized HOT 2
- 没有找到上传视频的api,能否实现呢? HOT 1
- 关于 JS-SDK 的疑问 HOT 1
- add ruby 3 support HOT 2
- 消息发送疑问 HOT 4
- Ruby 3.0 + Rails 6.1 shows DEPRECATION WARNING running rspec HOT 7
- 使用 wechat_responder account 无法正确加载配置 HOT 1
- 小程序MpApi的initialize 错误 HOT 3
- 能否支持响应小程序卡片消息类型miniprogrampage? HOT 1
- 请问支持企业微信的获取【会话内容存档】功能么 HOT 4
- 如何调用mp_api下关于小程序的API? HOT 1
- 微信的草稿箱功能什么时候可以支持,图文素材现在部分公众号已经用不了了 HOT 1
- An error occurred with wechat command-line 1st attempt HOT 5
- Psych::BadAlias (Unknown alias: default) HOT 2
- 请问使用wechat_responder没有响应是怎么回事? HOT 11
- 是不是要向psych (5.0.0)做一些兼容处理了? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wechat.