mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
Feature: Create conversations from Tweets (#470)
* Feature: Add tweets to conversations
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Webhooks::Twitter
|
||||
SUPPORTED_EVENTS = [:direct_message_events].freeze
|
||||
SUPPORTED_EVENTS = [:direct_message_events, :tweet_create_events].freeze
|
||||
|
||||
attr_accessor :params, :account
|
||||
|
||||
@@ -22,4 +22,8 @@ class Webhooks::Twitter
|
||||
def direct_message_events
|
||||
::Twitter::DirectMessageParserService.new(payload: @params).perform
|
||||
end
|
||||
|
||||
def tweet_create_events
|
||||
::Twitter::TweetParserService.new(payload: @params).perform
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user