use full file url for open graph url if a file doesn't have a large version
This commit is contained in:
@@ -201,8 +201,12 @@ class Post < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def open_graph_image_url
|
def open_graph_image_url
|
||||||
if is_image? && has_large?
|
if is_image?
|
||||||
"http://#{Danbooru.config.hostname}#{large_file_url}"
|
if has_large?
|
||||||
|
"http://#{Danbooru.config.hostname}#{large_file_url}"
|
||||||
|
else
|
||||||
|
"http://#{Danbooru.config.hostname}#{file_url}"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
complete_preview_file_url
|
complete_preview_file_url
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user