mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
more straight-forward way #194
This commit is contained in:
parent
3203ac5506
commit
727f089044
1 changed files with 1 additions and 1 deletions
|
@ -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://'):
|
||||
|
|
Loading…
Add table
Reference in a new issue