mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-23 21:15:05 +01:00
Fix tootctl media refresh (#13751)
This commit is contained in:
parent
af53cfd19e
commit
cbfb2c0e71
@ -198,7 +198,7 @@ module Mastodon
|
|||||||
if options[:status]
|
if options[:status]
|
||||||
scope = MediaAttachment.where(status_id: options[:status])
|
scope = MediaAttachment.where(status_id: options[:status])
|
||||||
elsif options[:account]
|
elsif options[:account]
|
||||||
username, domain = username.split('@')
|
username, domain = options[:account].split('@')
|
||||||
account = Account.find_remote(username, domain)
|
account = Account.find_remote(username, domain)
|
||||||
|
|
||||||
if account.nil?
|
if account.nil?
|
||||||
@ -217,7 +217,7 @@ module Mastodon
|
|||||||
next if media_attachment.remote_url.blank? || (!options[:force] && media_attachment.file_file_name.present?)
|
next if media_attachment.remote_url.blank? || (!options[:force] && media_attachment.file_file_name.present?)
|
||||||
|
|
||||||
unless options[:dry_run]
|
unless options[:dry_run]
|
||||||
media_attachment.reset_file!
|
media_attachment.file_remote_url = media_attachment.remote_url
|
||||||
media_attachment.save
|
media_attachment.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user