User1342 commited on
Commit
032cf36
·
1 Parent(s): 9309ea8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -230,7 +230,9 @@ def block_user(user_id, user, reason):
230
  while not finished:
231
 
232
  try:
233
- client.account_block("alcinnz@floss.social")
 
 
234
  print("Blocked {} for {}".format(user, reason))
235
  except MastodonNotFoundError as e:
236
  if "Record not found" in str(e):
 
230
  while not finished:
231
 
232
  try:
233
+ user ="alcinnz@floss.social"
234
+ user_dict = client.account_search(user)
235
+ client.account_block(user_dict[id])
236
  print("Blocked {} for {}".format(user, reason))
237
  except MastodonNotFoundError as e:
238
  if "Record not found" in str(e):