Less indentation

merge-requests/30/head
Bob Mottram 2024-08-04 20:14:17 +01:00
parent 52ea6b3a7e
commit 2d0a53bd29
1 changed files with 9 additions and 8 deletions

View File

@ -3492,14 +3492,15 @@ def undo_reaction_collection_entry(recent_posts_cache: {},
total_items = obj['reactions']['totalItems'] total_items = obj['reactions']['totalItems']
item_found = False item_found = False
for like_item in obj['reactions']['items']: for like_item in obj['reactions']['items']:
if like_item.get('actor'): if not like_item.get('actor'):
if like_item['actor'] == actor and \ continue
like_item['content'] == emoji_content: if like_item['actor'] == actor and \
if debug: like_item['content'] == emoji_content:
print('DEBUG: emoji reaction was removed for ' + actor) if debug:
obj['reactions']['items'].remove(like_item) print('DEBUG: emoji reaction was removed for ' + actor)
item_found = True obj['reactions']['items'].remove(like_item)
break item_found = True
break
if not item_found: if not item_found:
return return
if total_items == 1: if total_items == 1: