diff --git a/app/assets/javascripts/discourse/templates/components/topic-map.hbs b/app/assets/javascripts/discourse/templates/components/topic-map.hbs index 1ab49363e76..8043f66028f 100644 --- a/app/assets/javascripts/discourse/templates/components/topic-map.hbs +++ b/app/assets/javascripts/discourse/templates/components/topic-map.hbs @@ -72,7 +72,7 @@ {{link.clicks}} - + {{#if link.title}}{{link.title}}{{else}}{{shorten-url link.url}}{{/if}} {{link-domain link}} diff --git a/app/serializers/topic_link_serializer.rb b/app/serializers/topic_link_serializer.rb index e14c9e8d554..1f64aec4be3 100644 --- a/app/serializers/topic_link_serializer.rb +++ b/app/serializers/topic_link_serializer.rb @@ -4,6 +4,7 @@ class TopicLinkSerializer < ApplicationSerializer :title, :fancy_title, :internal, + :attachment, :reflection, :clicks, :user_id, @@ -25,6 +26,10 @@ class TopicLinkSerializer < ApplicationSerializer object['internal'] == 't' end + def attachment + Discourse.store.has_been_uploaded?(object['url']) + end + def reflection object['reflection'] == 't' end