diff --git a/app/builders/messages/messenger/message_builder.rb b/app/builders/messages/messenger/message_builder.rb index 6d3ed0179..27386c250 100644 --- a/app/builders/messages/messenger/message_builder.rb +++ b/app/builders/messages/messenger/message_builder.rb @@ -54,6 +54,9 @@ class Messages::Messenger::MessageBuilder def fetch_story_link(attachment) message = attachment.message result = get_story_object_from_source_id(message.source_id) + + return if result.blank? + story_id = result['story']['mention']['id'] story_sender = result['from']['username'] message.content_attributes[:story_sender] = story_sender