Method: Model::Request#reply_from_response

Defined in:
app/models/wechat/model/request.rb

#reply_from_responseObject



85
86
87
88
89
90
91
92
93
# File 'app/models/wechat/model/request.rb', line 85

def reply_from_response
  if body.present?
    res = responses.find_by(match_value: body)
  else
    res = responses[0]
  end

  res.invoke_effect(self) if res
end