Chore: Provide fixed attachment URLs for Channels (#4507)
Prior to this change, The attachment URL sent from Chatwoot to 3rd party integrations like Whatsapp and Facebook involved a 301 redirect before the original content is served. This causes intermittent breakages for the sent attachments. fixes: #3632 ref: https://blog.saeloun.com/2021/09/14/rails-7-adds-expiring-urls-to-active-storage.html
This commit is contained in:
@@ -73,7 +73,7 @@ class Integrations::Slack::SendOnSlackService < Base::SendOnChannelService
|
||||
end
|
||||
|
||||
def file_type
|
||||
File.extname(message.attachments.first.file_url).strip.downcase[1..]
|
||||
File.extname(message.attachments.first.download_url).strip.downcase[1..]
|
||||
end
|
||||
|
||||
def file_information
|
||||
|
||||
Reference in New Issue
Block a user