Git Product home page Git Product logo

Comments (4)

Eric-Guo avatar Eric-Guo commented on June 14, 2024

我猜这个报错的意思是就算你返回了消息,用户也收不到了(因为退订了)

所以如果你直接返回空字符串应该可以避免这个错误。

class WechatsController < ApplicationController
  wechat_responder  
  # 当用户取消关注订阅
  on :event, with: 'unsubscribe' do |request|
    request.reply.text ""
  end
end

from wechat.

yiichou avatar yiichou commented on June 14, 2024

是的 这个问题并不会对我们的服务造成任何困扰,并且得益于它的报警我们可以在发完一次推送消息以后很快的发现是否有大量掉粉 😂😂😂😂

如果不写 request.reply.text 返回的应该也是空字串吧,这样做依然会有报错,周末我会试着排查一下,如果没有什么发现我就返回空字串试试,由于要大量掉粉才能触发,再现难度比较大

from wechat.

Eric-Guo avatar Eric-Guo commented on June 14, 2024

目前版本不能不写request.reply.text。我又仔细看了一下微信文档,应该整个返回空,让我再改改看。

from wechat.

Eric-Guo avatar Eric-Guo commented on June 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.