0
0
Fork 0

Stop setting a shortcode to newly-created media attachments (#16730)

* Stop setting a shortcode to newly-created media attachments

The WebUI has stopped using the “short media URL” in ages. This isn't used
anywhere except for mail notifications.

Deprecating it would allow us to eventually get rid of at least a database
column and corruption-prone index, as well as a controller.

* Fix tests
This commit is contained in:
Claire 2021-09-13 18:59:37 +02:00 committed by GitHub
parent 75027b51a4
commit db57bff11d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 14 deletions

View file

@ -40,7 +40,7 @@ class REST::MediaAttachmentSerializer < ActiveModel::Serializer
end
def text_url
object.local? ? medium_url(object) : nil
object.local? && object.shortcode.present? ? medium_url(object) : nil
end
def meta