Skip to content

Commit

Permalink
bug fix for e5abdc0: set g.user before activitypub.postprocess_as2
Browse files Browse the repository at this point in the history
for #383
  • Loading branch information
snarfed committed Nov 23, 2023
1 parent e5abdc0 commit 22b80e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions activitypub.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,12 +938,12 @@ def outbox(id):
if not protocol:
error(f"Couldn't determine protocol", status=404)

user = protocol.get_by_id(id)
if not user:
g.user = protocol.get_by_id(id)
if not g.user:
error(f'User {id} not found', status=404)

query = Object.query(Object.users == user.key)
objects, before, after = fetch_objects(query, by=Object.updated, user=user)
query = Object.query(Object.users == g.user.key)
objects, before, after = fetch_objects(query, by=Object.updated, user=g.user)

return {
'@context': 'https://www.w3.org/ns/activitystreams',
Expand Down

0 comments on commit 22b80e4

Please sign in to comment.