Fix Codex's code review comments

This commit is contained in:
Stanko K.R.
2026-07-20 18:37:43 +02:00
parent bfb57a23f9
commit 54a507a852
8 changed files with 29 additions and 43 deletions
@@ -2,6 +2,7 @@ class ActionText::Attachment::OpengraphEmbed
include ActiveModel::Model
OPENGRAPH_EMBED_CONTENT_TYPE = "application/vnd.actiontext.opengraph-embed"
TWITTER_AVATAR_URL_PREFIX = "https://pbs.twimg.com/profile_images"
class << self
def from_node(node)
@@ -47,6 +48,10 @@ class ActionText::Attachment::OpengraphEmbed
attr_accessor :href, :url, :filename, :description
def twitter_avatar?
url.to_s.start_with?(TWITTER_AVATAR_URL_PREFIX)
end
def attachable_content_type
OPENGRAPH_EMBED_CONTENT_TYPE
end