Last active
June 7, 2020 16:58
-
-
Save vchrombie/2d1493abf2b074fb3acce896c9f4e557 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __get_reactions(self, item): | |
reactions = () | |
item_reactions = item.get('award_emoji_data', []) | |
for item in item_reactions: | |
reaction = { | |
'type': item['name'], | |
'count': sum(1 for i in item_reactions if i['name'] == item['name']) | |
} | |
reactions.add(reaction) | |
return list(reactions) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment