about summary refs log tree commit diff
path: root/lib/mastodon
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-05-14 18:49:10 +0200
committerThibaut Girka <thib@sitedethib.com>2020-05-14 18:49:10 +0200
commitf94aebafe500c5e967e6a27d45217e1afe67f695 (patch)
tree1523b1279eb7f90fa1d517d4ba73b2ecaa912686 /lib/mastodon
parente1d282023432ff4a88cb795f3a9889704314e448 (diff)
parentc9dcc2d39fb5bd945ecd999e50c08a86cce1aa3e (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'lib/mastodon')
-rw-r--r--lib/mastodon/media_cli.rb4
-rw-r--r--lib/mastodon/version.rb2
2 files changed, 3 insertions, 3 deletions
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
 
diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb
index ba78a3c30..fa85f8e37 100644
--- a/lib/mastodon/version.rb
+++ b/lib/mastodon/version.rb
@@ -13,7 +13,7 @@ module Mastodon
     end
 
     def patch
-      3
+      4
     end
 
     def flags