Implemented "muted" command
This lists accounts the logged in user has muted. It is useful for creating regular backups.
This commit is contained in:
parent
4f62f417f8
commit
39d7a345ed
3 changed files with 15 additions and 0 deletions
|
@ -521,6 +521,10 @@ def unmute(app, user, account):
|
|||
return _account_action(app, user, account, 'unmute')
|
||||
|
||||
|
||||
def muted(app, user):
|
||||
return _get_response_list(app, user, "/api/v1/mutes")
|
||||
|
||||
|
||||
def block(app, user, account):
|
||||
return _account_action(app, user, account, 'block')
|
||||
|
||||
|
|
|
@ -493,6 +493,11 @@ def unmute(app, user, args):
|
|||
print_out("<green>✓ {} is no longer muted</green>".format(args.account))
|
||||
|
||||
|
||||
def muted(app, user, args):
|
||||
response = api.muted(app, user)
|
||||
print_acct_list(response)
|
||||
|
||||
|
||||
def block(app, user, args):
|
||||
account = api.find_account(app, user, args.account)
|
||||
api.block(app, user, account['id'])
|
||||
|
|
|
@ -704,6 +704,12 @@ ACCOUNTS_COMMANDS = [
|
|||
],
|
||||
require_auth=True,
|
||||
),
|
||||
Command(
|
||||
name="muted",
|
||||
description="List accounts the given account muted",
|
||||
arguments=[],
|
||||
require_auth=True,
|
||||
),
|
||||
Command(
|
||||
name="block",
|
||||
description="Block an account",
|
||||
|
|
Loading…
Reference in a new issue