feat: handle unsupported media on the backend (#8650)

This PR logs additional information in content_attributes of a message in case it is unsupported. This info can be used by the client to render a fresh UI
This commit is contained in:
Shivam Mishra
2024-01-06 02:35:00 +05:30
committed by GitHub
parent 68062216e4
commit 6e30064421
4 changed files with 54 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ class Message < ApplicationRecord
# [:external_error : Can specify if the message creation failed due to an error at external API
store :content_attributes, accessors: [:submitted_email, :items, :submitted_values, :email, :in_reply_to, :deleted,
:external_created_at, :story_sender, :story_id, :external_error,
:translations, :in_reply_to_external_id], coder: JSON
:translations, :in_reply_to_external_id, :is_unsupported], coder: JSON
store :external_source_ids, accessors: [:slack], coder: JSON, prefix: :external_source_id