chore: API fixes (#3014)

- Minor API fixes
- Configuration screen for LINE inbox
This commit is contained in:
Sojan Jose
2021-09-14 22:44:53 +05:30
committed by GitHub
parent 946a09928e
commit 2396b59f11
11 changed files with 76 additions and 16 deletions

View File

@@ -1,9 +1,17 @@
# ref : https://developers.line.biz/en/docs/messaging-api/receiving-messages/#webhook-event-types
# https://developers.line.biz/en/reference/messaging-api/#message-event
class Line::IncomingMessageService
include ::FileTypeHelper
pattr_initialize [:inbox!, :params!]
def perform
# probably test events
return if params[:events].blank?
line_contact_info
return if line_contact_info['userId'].blank?
set_contact
set_conversation
# TODO: iterate over the events and handle the attachments in future