From: Takeshi Umeda Date: Thu, 14 May 2020 05:45:52 +0000 (+0900) Subject: Fix tootctl media refresh (#13751) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=cbfb2c0e71fd281e3e8f362d9016944884abc39e;p=mastodon.git Fix tootctl media refresh (#13751) --- diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb index 506544446..2b1653335 100644 --- a/lib/mastodon/media_cli.rb +++ b/lib/mastodon/media_cli.rb @@ -198,7 +198,7 @@ module Mastodon if options[:status] scope = MediaAttachment.where(status_id: options[:status]) elsif options[:account] - username, domain = username.split('@') + username, domain = options[:account].split('@') account = Account.find_remote(username, domain) if account.nil? @@ -217,7 +217,7 @@ module Mastodon next if media_attachment.remote_url.blank? || (!options[:force] && media_attachment.file_file_name.present?) unless options[:dry_run] - media_attachment.reset_file! + media_attachment.file_remote_url = media_attachment.remote_url media_attachment.save end