mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 11:37:58 +00:00
upgrade facebook messenger gem (#159)
- carrierwave local config - upgrade facebook messenger gem to support facebook graph api 4.0
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -57,7 +57,7 @@ gem 'chargebee', '~>2'
|
|||||||
|
|
||||||
|
|
||||||
##--- gems for channels ---##
|
##--- gems for channels ---##
|
||||||
gem 'facebook-messenger', '~> 0.11.1'
|
gem 'facebook-messenger'
|
||||||
gem 'twitter'
|
gem 'twitter'
|
||||||
gem 'telegram-bot-ruby'
|
gem 'telegram-bot-ruby'
|
||||||
# facebook client
|
# facebook client
|
||||||
|
|||||||
72
Gemfile.lock
72
Gemfile.lock
@@ -1,6 +1,6 @@
|
|||||||
GIT
|
GIT
|
||||||
remote: git://github.com/rails/rails.git
|
remote: git://github.com/rails/rails.git
|
||||||
revision: a4ea17f6b6c11e1b0b550a40cfd3811a56cc94d7
|
revision: 7f6d2914c64e7b5224784152fc2d315b6b5b9d60
|
||||||
specs:
|
specs:
|
||||||
actioncable (6.1.0.alpha)
|
actioncable (6.1.0.alpha)
|
||||||
actionpack (= 6.1.0.alpha)
|
actionpack (= 6.1.0.alpha)
|
||||||
@@ -59,7 +59,7 @@ GIT
|
|||||||
i18n (>= 0.7, < 2)
|
i18n (>= 0.7, < 2)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
zeitwerk (~> 2.1, >= 2.1.8)
|
zeitwerk (~> 2.2)
|
||||||
rails (6.1.0.alpha)
|
rails (6.1.0.alpha)
|
||||||
actioncable (= 6.1.0.alpha)
|
actioncable (= 6.1.0.alpha)
|
||||||
actionmailbox (= 6.1.0.alpha)
|
actionmailbox (= 6.1.0.alpha)
|
||||||
@@ -84,12 +84,13 @@ GIT
|
|||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: https://github.com/lynndylanhurley/devise_token_auth
|
remote: https://github.com/lynndylanhurley/devise_token_auth
|
||||||
revision: 2a32f18ccce15638a74e72f6cfde5cf15a808d3f
|
revision: d886f476c625a1bf9673f03b95fb629e75ac2875
|
||||||
specs:
|
specs:
|
||||||
devise_token_auth (1.1.3)
|
devise_token_auth (1.1.3)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
devise (> 3.5.2, < 5)
|
devise (> 3.5.2, < 5)
|
||||||
rails (>= 4.2.0, < 6.1)
|
rails (>= 4.2.0, < 6.1)
|
||||||
|
sprockets (= 3.7.2)
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: https://github.com/mbleigh/acts-as-taggable-on
|
remote: https://github.com/mbleigh/acts-as-taggable-on
|
||||||
@@ -100,7 +101,7 @@ GIT
|
|||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: https://github.com/plataformatec/devise
|
remote: https://github.com/plataformatec/devise
|
||||||
revision: f48b6f1651233a39c52dd70e9ac6c35f70086062
|
revision: c5de66245460920f9ce98af43c20188c8948f036
|
||||||
specs:
|
specs:
|
||||||
devise (4.7.1)
|
devise (4.7.1)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
@@ -117,8 +118,8 @@ GEM
|
|||||||
ast (2.4.0)
|
ast (2.4.0)
|
||||||
attr_extras (6.2.1)
|
attr_extras (6.2.1)
|
||||||
aws-eventstream (1.0.3)
|
aws-eventstream (1.0.3)
|
||||||
aws-partitions (1.220.0)
|
aws-partitions (1.226.0)
|
||||||
aws-sdk-core (3.68.1)
|
aws-sdk-core (3.69.1)
|
||||||
aws-eventstream (~> 1.0, >= 1.0.2)
|
aws-eventstream (~> 1.0, >= 1.0.2)
|
||||||
aws-partitions (~> 1.0)
|
aws-partitions (~> 1.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
@@ -126,7 +127,7 @@ GEM
|
|||||||
aws-sdk-kms (1.24.0)
|
aws-sdk-kms (1.24.0)
|
||||||
aws-sdk-core (~> 3, >= 3.61.1)
|
aws-sdk-core (~> 3, >= 3.61.1)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-s3 (1.48.0)
|
aws-sdk-s3 (1.50.0)
|
||||||
aws-sdk-core (~> 3, >= 3.61.1)
|
aws-sdk-core (~> 3, >= 3.61.1)
|
||||||
aws-sdk-kms (~> 1)
|
aws-sdk-kms (~> 1)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
@@ -140,7 +141,7 @@ GEM
|
|||||||
bindex (0.8.1)
|
bindex (0.8.1)
|
||||||
bootsnap (1.4.5)
|
bootsnap (1.4.5)
|
||||||
msgpack (~> 1.0)
|
msgpack (~> 1.0)
|
||||||
brakeman (4.6.1)
|
brakeman (4.7.0)
|
||||||
buftok (0.2.0)
|
buftok (0.2.0)
|
||||||
builder (3.2.3)
|
builder (3.2.3)
|
||||||
byebug (11.0.1)
|
byebug (11.0.1)
|
||||||
@@ -169,34 +170,31 @@ GEM
|
|||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.1.5)
|
concurrent-ruby (1.1.5)
|
||||||
connection_pool (2.2.2)
|
connection_pool (2.2.2)
|
||||||
crass (1.0.4)
|
crass (1.0.5)
|
||||||
descendants_tracker (0.0.4)
|
descendants_tracker (0.0.4)
|
||||||
thread_safe (~> 0.3, >= 0.3.1)
|
thread_safe (~> 0.3, >= 0.3.1)
|
||||||
diff-lcs (1.3)
|
diff-lcs (1.3)
|
||||||
domain_name (0.5.20190701)
|
domain_name (0.5.20190701)
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
dotenv (0.7.0)
|
|
||||||
equalizer (0.0.11)
|
equalizer (0.0.11)
|
||||||
erubi (1.9.0)
|
erubi (1.9.0)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
facebook-messenger (0.11.1)
|
facebook-messenger (1.4.1)
|
||||||
httparty (~> 0.13, >= 0.13.7)
|
httparty (~> 0.13, >= 0.13.7)
|
||||||
rack (>= 1.6.4)
|
rack (>= 1.4.5)
|
||||||
factory_bot (5.1.1)
|
factory_bot (5.1.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
factory_bot_rails (5.1.1)
|
factory_bot_rails (5.1.1)
|
||||||
factory_bot (~> 5.1.0)
|
factory_bot (~> 5.1.0)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
faker (2.1.2)
|
faker (2.6.0)
|
||||||
i18n (>= 0.8)
|
i18n (>= 1.6, < 1.8)
|
||||||
faraday (0.16.2)
|
faraday (0.17.0)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
ffi (1.11.1)
|
ffi (1.11.1)
|
||||||
figaro (1.1.1)
|
figaro (1.1.1)
|
||||||
thor (~> 0.14)
|
thor (~> 0.14)
|
||||||
foreman (0.64.0)
|
foreman (0.86.0)
|
||||||
dotenv (~> 0.7.0)
|
|
||||||
thor (>= 0.13.6)
|
|
||||||
globalid (0.4.2)
|
globalid (0.4.2)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
hashie (3.6.0)
|
hashie (3.6.0)
|
||||||
@@ -263,7 +261,7 @@ GEM
|
|||||||
method_source (0.9.2)
|
method_source (0.9.2)
|
||||||
mime-types (3.3)
|
mime-types (3.3)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2019.0904)
|
mime-types-data (3.2019.1009)
|
||||||
mimemagic (0.3.3)
|
mimemagic (0.3.3)
|
||||||
mini_magick (4.9.5)
|
mini_magick (4.9.5)
|
||||||
mini_mime (1.0.2)
|
mini_mime (1.0.2)
|
||||||
@@ -271,7 +269,7 @@ GEM
|
|||||||
minitest (5.12.2)
|
minitest (5.12.2)
|
||||||
mock_redis (0.22.0)
|
mock_redis (0.22.0)
|
||||||
msgpack (1.3.1)
|
msgpack (1.3.1)
|
||||||
multi_json (1.13.1)
|
multi_json (1.14.1)
|
||||||
multi_xml (0.6.0)
|
multi_xml (0.6.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.1.1)
|
||||||
naught (1.1.0)
|
naught (1.1.0)
|
||||||
@@ -336,23 +334,23 @@ GEM
|
|||||||
http-cookie (>= 1.0.2, < 2.0)
|
http-cookie (>= 1.0.2, < 2.0)
|
||||||
mime-types (>= 1.16, < 4.0)
|
mime-types (>= 1.16, < 4.0)
|
||||||
netrc (~> 0.8)
|
netrc (~> 0.8)
|
||||||
rspec-core (3.8.2)
|
rspec-core (3.9.0)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-support (~> 3.9.0)
|
||||||
rspec-expectations (3.8.5)
|
rspec-expectations (3.9.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-support (~> 3.9.0)
|
||||||
rspec-mocks (3.8.2)
|
rspec-mocks (3.9.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-support (~> 3.9.0)
|
||||||
rspec-rails (3.8.2)
|
rspec-rails (3.9.0)
|
||||||
actionpack (>= 3.0)
|
actionpack (>= 3.0)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
railties (>= 3.0)
|
railties (>= 3.0)
|
||||||
rspec-core (~> 3.8.0)
|
rspec-core (~> 3.9.0)
|
||||||
rspec-expectations (~> 3.8.0)
|
rspec-expectations (~> 3.9.0)
|
||||||
rspec-mocks (~> 3.8.0)
|
rspec-mocks (~> 3.9.0)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-support (~> 3.9.0)
|
||||||
rspec-support (3.8.3)
|
rspec-support (3.9.0)
|
||||||
rubocop (0.73.0)
|
rubocop (0.73.0)
|
||||||
jaro_winkler (~> 1.5.1)
|
jaro_winkler (~> 1.5.1)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
@@ -361,16 +359,16 @@ GEM
|
|||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 1.7)
|
unicode-display_width (>= 1.4.0, < 1.7)
|
||||||
ruby-progressbar (1.10.1)
|
ruby-progressbar (1.10.1)
|
||||||
ruby-vips (2.0.15)
|
ruby-vips (2.0.16)
|
||||||
ffi (~> 1.9)
|
ffi (~> 1.9)
|
||||||
seed_dump (3.3.1)
|
seed_dump (3.3.1)
|
||||||
activerecord (>= 4)
|
activerecord (>= 4)
|
||||||
activesupport (>= 4)
|
activesupport (>= 4)
|
||||||
sentry-raven (2.11.3)
|
sentry-raven (2.12.0)
|
||||||
faraday (>= 0.7.6, < 1.0)
|
faraday (>= 0.7.6, < 1.0)
|
||||||
shoulda-matchers (4.1.2)
|
shoulda-matchers (4.1.2)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
sidekiq (6.0.1)
|
sidekiq (6.0.2)
|
||||||
connection_pool (>= 2.2.2)
|
connection_pool (>= 2.2.2)
|
||||||
rack (>= 2.0.0)
|
rack (>= 2.0.0)
|
||||||
rack-protection (>= 2.0.0)
|
rack-protection (>= 2.0.0)
|
||||||
@@ -441,7 +439,7 @@ GEM
|
|||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.4)
|
websocket-extensions (0.1.4)
|
||||||
wisper (2.0.0)
|
wisper (2.0.0)
|
||||||
zeitwerk (2.1.10)
|
zeitwerk (2.2.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
@@ -457,7 +455,7 @@ DEPENDENCIES
|
|||||||
coffee-rails
|
coffee-rails
|
||||||
devise!
|
devise!
|
||||||
devise_token_auth!
|
devise_token_auth!
|
||||||
facebook-messenger (~> 0.11.1)
|
facebook-messenger
|
||||||
factory_bot_rails
|
factory_bot_rails
|
||||||
faker
|
faker
|
||||||
figaro
|
figaro
|
||||||
|
|||||||
@@ -44,6 +44,6 @@ class Inbox < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def subscribe_webhook
|
def subscribe_webhook
|
||||||
Facebook::Messenger::Subscriptions.subscribe(access_token: channel.page_access_token)
|
Facebook::Messenger::Subscriptions.subscribe(access_token: channel.page_access_token, subscribed_fields: %w[message_mention messages messaging_account_linking messaging_checkout_updates message_echoes message_deliveries messaging_game_plays messaging_optins messaging_optouts messaging_payments messaging_postbacks messaging_pre_checkouts message_reads messaging_referrals messaging_handovers messaging_policy_enforcement messaging_page_feedback messaging_appointments messaging_direct_sends])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
CarrierWave.configure do |config|
|
CarrierWave.configure do |config|
|
||||||
|
config.storage = :file
|
||||||
|
end
|
||||||
|
|
||||||
|
if Rails.env.production?
|
||||||
|
CarrierWave.configure do |config|
|
||||||
config.storage = :aws
|
config.storage = :aws
|
||||||
config.aws_bucket = ENV['S3_BUCKET_NAME']
|
config.aws_bucket = ENV['S3_BUCKET_NAME']
|
||||||
config.aws_acl = 'authenticated-read'
|
config.aws_acl = 'authenticated-read'
|
||||||
@@ -28,4 +33,5 @@ CarrierWave.configure do |config|
|
|||||||
# config.aws_signer = -> (unsigned_url, options) do
|
# config.aws_signer = -> (unsigned_url, options) do
|
||||||
# Aws::CF::Signer.sign_url(unsigned_url, options)
|
# Aws::CF::Signer.sign_url(unsigned_url, options)
|
||||||
# end
|
# end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user