about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorStanislas <angristan@pm.me>2019-08-17 22:59:40 +0200
committerEugen Rochko <eugen@zeonfederated.com>2019-08-17 22:59:40 +0200
commit3a77090d015203a1ae20376ed69ca699eed3976d (patch)
treeb75ed5d6b4fa02039a2519edd7e12a9e9dbb483b /lib
parentcd660d374adc9394aaeea22d5d41b29535d8a4c2 (diff)
Limit "tootctl accounts follow" to local accounts (#11592)
To (somewhat) limit mass remote follow. Fix #11360
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/accounts_cli.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/mastodon/accounts_cli.rb b/lib/mastodon/accounts_cli.rb
index 7d0215313..d1854acc0 100644
--- a/lib/mastodon/accounts_cli.rb
+++ b/lib/mastodon/accounts_cli.rb
@@ -314,11 +314,15 @@ module Mastodon
 
     desc 'follow ACCT', 'Make all local accounts follow account specified by ACCT'
     long_desc <<-LONG_DESC
-      Make all local accounts follow an account specified by ACCT. ACCT can be
-      a simple username, in case of a local user. It can also be in the format
-      username@domain, in case of a remote user.
+      Make all local accounts follow another local account specified by ACCT.
+      ACCT should be the username only.
     LONG_DESC
     def follow(acct)
+      if acct.include? '@'
+        say('Target account name should not contain a target instance, since it has to be a local account.', :red)
+        exit(1)
+      end
+
       target_account = ResolveAccountService.new.call(acct)
       processed      = 0
       failed         = 0