chore: Remove delete Instagram story implementation (#11097)
Currently, Instagram stories are downloaded and displayed as attachments. We previously implemented story deletion by checking individual messages via https://github.com/chatwoot/chatwoot/pull/5300/files#diff-684a16c1b0b4c099fcdfeed95b1820e11fef629fe332ec7ce6a8c600331dd06dR110, but this approach proved impractical and was removed. This PR removes all unused code to avoid confusion. We will revisit the story deletion feature when we implement `instagram_manage_insights`.
This commit is contained in:
@@ -155,15 +155,6 @@ class Message < ApplicationRecord
|
||||
}
|
||||
end
|
||||
|
||||
# TODO: We will be removing this code after instagram_manage_insights is implemented
|
||||
# Better logic is to listen to webhook and remove stories proactively rather than trying
|
||||
# a fetch every time a message is returned
|
||||
def validate_instagram_story
|
||||
inbox.channel.fetch_instagram_story_link(self)
|
||||
# we want to reload the message in case the story has expired and data got removed
|
||||
reload
|
||||
end
|
||||
|
||||
def merge_sender_attributes(data)
|
||||
data[:sender] = sender.push_event_data if sender && !sender.is_a?(AgentBot)
|
||||
data[:sender] = sender.push_event_data(inbox) if sender.is_a?(AgentBot)
|
||||
|
||||
Reference in New Issue
Block a user