diff --git a/atproto.py b/atproto.py index 29eff77..82d3a31 100644 --- a/atproto.py +++ b/atproto.py @@ -827,8 +827,10 @@ class ATProto(User, Protocol): repo_did=repo_did, privkey=repo.signing_key) - client = Client(f'https://{mod_host}', truncate=True, - headers={'User-Agent': USER_AGENT}) + client = Client(f'https://{mod_host}', truncate=True, headers={ + 'User-Agent': USER_AGENT, + 'Authorization': f'Bearer {token}', + }) output = client.com.atproto.moderation.createReport(input) logger.info(f'Created report on {mod_host}: {json_dumps(output)}') return True diff --git a/tests/test_atproto.py b/tests/test_atproto.py index 3ada577..ef9c6c7 100644 --- a/tests/test_atproto.py +++ b/tests/test_atproto.py @@ -1735,7 +1735,11 @@ Sed tortor neque, aliquet quis posuere aliquam […] 'uri': uri, 'cid': 'bafy...', }, - }, data=None, headers=ANY) + }, data=None, headers={ + 'Content-Type': 'application/json', + 'User-Agent': common.USER_AGENT, + 'Authorization': ANY, + }) def test_datastore_client_get_record_datastore_object(self): self.make_user_and_repo()