mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
still return HTTP 200 even if activity was not logged. Hopefully friendca will cope #103
This commit is contained in:
parent
eaca1ccfaf
commit
ff42ae3f1f
1 changed files with 4 additions and 1 deletions
|
@ -1104,7 +1104,10 @@ def post_ap(post_id):
|
|||
def activities_json(type, id):
|
||||
activity = ActivityPubLog.query.filter_by(activity_id=f"https://{current_app.config['SERVER_NAME']}/activities/{type}/{id}").first()
|
||||
if activity:
|
||||
activity_json = json.loads(activity.activity_json)
|
||||
if activity.activity_json is not None:
|
||||
activity_json = json.loads(activity.activity_json)
|
||||
else:
|
||||
activity_json = {}
|
||||
resp = jsonify(activity_json)
|
||||
resp.content_type = 'application/activity+json'
|
||||
return resp
|
||||
|
|
Loading…
Reference in a new issue