From 727f0890442f12565276016aeddb64fbbf68d281 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:33:58 +1200 Subject: [PATCH] more straight-forward way #194 --- app/activitypub/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/activitypub/util.py b/app/activitypub/util.py index ccff4f7b..78755937 100644 --- a/app/activitypub/util.py +++ b/app/activitypub/util.py @@ -294,7 +294,7 @@ def find_actor_or_create(actor: str, create_if_not_found=True, community_only=Fa return Community.query.filter(Community.ap_profile_id == actor).first() # finds communities formatted like https://localhost/c/* if current_app.config['SERVER_NAME'] + '/u/' in actor: - user = User.query.filter(func.lower(User.user_name) == actor.split('/')[-1]).filter_by(ap_id=None, banned=False).first() # finds local users + user = User.query.filter(User.ap_profile_id == actor).filter_by(ap_id=None, banned=False).first() # finds local users if user is None: return None elif actor.startswith('https://'):