fix: Automatically remove expired story mention (#5300)
When a user mentions the connected Instagram page in a story, the story's content is downloaded in Chatwoot, then if the user deletes the story, the content persists in the platform. fixes: #5258
This commit is contained in:
@@ -70,12 +70,15 @@ class Attachment < ApplicationRecord
|
||||
private
|
||||
|
||||
def file_metadata
|
||||
{
|
||||
metadata = {
|
||||
extension: extension,
|
||||
data_url: file_url,
|
||||
thumb_url: thumb_url,
|
||||
file_size: file.byte_size
|
||||
}
|
||||
|
||||
metadata[:data_url] = metadata[:thumb_url] = external_url if message.instagram_story_mention?
|
||||
metadata
|
||||
end
|
||||
|
||||
def location_metadata
|
||||
|
||||
Reference in New Issue
Block a user