Skip to content

Commit

Permalink
don't try to relate if it's not a ProjectMedia
Browse files Browse the repository at this point in the history
  • Loading branch information
vasconsaurus committed Dec 17, 2024
1 parent ca7730a commit 5583fd3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/concerns/smooch_messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ def smoooch_post_save_message_actions(message, associated, app_id, author, reque
end

def smooch_relate_items_for_same_message(message, associated, app_id, author, request_type, associated_obj)
return if associated.class.name != 'ProjectMedia'
if !message['caption'].blank?
# Check if message contains caption then create an item and force relationship
self.relate_item_and_text(message, associated, app_id, author, request_type, associated_obj, Relationship.confirmed_type)
Expand Down

0 comments on commit 5583fd3

Please sign in to comment.