Less indentation

main
Bob Mottram 2024-07-15 21:08:25 +01:00
parent 8fcd845c23
commit 44bff188c2
1 changed files with 16 additions and 15 deletions

View File

@ -1545,21 +1545,22 @@ def _consolidate_actors_list(actors_list: []) -> None:
if '/@/' not in cc_actor:
if cc_actor not in possible_duplicate_actors:
possible_duplicate_actors.append(cc_actor)
if possible_duplicate_actors:
u_paths = get_user_paths()
remove_actors = []
for cc_actor in possible_duplicate_actors:
for usr_path in u_paths:
if '/@/' not in cc_actor:
cc_actor_full = cc_actor.replace('/@', usr_path)
else:
cc_actor_full = cc_actor
if cc_actor_full in actors_list:
if cc_actor not in remove_actors:
remove_actors.append(cc_actor)
break
for cc_actor in remove_actors:
actors_list.remove(cc_actor)
if not possible_duplicate_actors:
return
u_paths = get_user_paths()
remove_actors = []
for cc_actor in possible_duplicate_actors:
for usr_path in u_paths:
if '/@/' not in cc_actor:
cc_actor_full = cc_actor.replace('/@', usr_path)
else:
cc_actor_full = cc_actor
if cc_actor_full in actors_list:
if cc_actor not in remove_actors:
remove_actors.append(cc_actor)
break
for cc_actor in remove_actors:
actors_list.remove(cc_actor)
def _create_post_mentions(cc_url: str, new_post: {},