Skip to content
Extraits de code Groupes Projets
Valider 3dce6cbb rédigé par abcang's avatar abcang Validation de Eugen Rochko
Parcourir les fichiers

Fixed duplicating URL of photo type of oEmbed (#5763)

parent 2bcc8170
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -74,6 +74,9 @@ class FetchLinkCardService < BaseService
return false unless response.respond_to?(:type)
# The photo will change the URL. So, to avoid duplication of URLs, PreviewCard needs to be checked again.
@card = PreviewCard.find_by(url: response.url) || @card if response.type == 'photo'
@card.type = response.type
@card.title = response.respond_to?(:title) ? response.title : ''
@card.author_name = response.respond_to?(:author_name) ? response.author_name : ''
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter