소스 검색

Limit "tootctl accounts follow" to local accounts (#11592)

To (somewhat) limit mass remote follow. Fix #11360
master^2
Stanislas 4 년 전
committed by Eugen Rochko
부모
커밋
3a77090d01
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. +7
    -3
      lib/mastodon/accounts_cli.rb

+ 7
- 3
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


불러오는 중...
취소
저장