lowercase ap_id on communities

This commit is contained in:
rimu 2024-04-30 21:11:57 +12:00
parent c9dc8780fe
commit 7805563b0f

View file

@ -300,7 +300,7 @@ def community_profile(actor):
# don't provide activitypub info for remote communities # don't provide activitypub info for remote communities
if 'application/ld+json' in request.headers.get('Accept', '') or 'application/activity+json' in request.headers.get('Accept', ''): if 'application/ld+json' in request.headers.get('Accept', '') or 'application/activity+json' in request.headers.get('Accept', ''):
abort(400) abort(400)
community: Community = Community.query.filter_by(ap_id=actor, banned=False).first() community: Community = Community.query.filter_by(ap_id=actor.lower(), banned=False).first()
else: else:
community: Community = Community.query.filter_by(name=actor, ap_id=None).first() community: Community = Community.query.filter_by(name=actor, ap_id=None).first()
if community is not None: if community is not None: