mirror of
https://github.com/fotoente/MiCECo.git
synced 2024-10-22 23:19:09 +00:00
Fixed: Emojis in poll texts will be counted as well
This commit is contained in:
parent
a6a442c54e
commit
d0878c0af0
1 changed files with 9 additions and 0 deletions
|
@ -196,11 +196,20 @@ for element in noteList:
|
||||||
emojiList[index]["count"] += element["cw"].count(emojiList[index]["emoji"]) # Count those Emojis, that
|
emojiList[index]["count"] += element["cw"].count(emojiList[index]["emoji"]) # Count those Emojis, that
|
||||||
# are in this note CW text
|
# are in this note CW text
|
||||||
|
|
||||||
|
if "poll" in element:
|
||||||
|
for pollchoice in element["poll"]["choices"]:
|
||||||
|
emojiList[index]["count"] += pollchoice["text"].count(emojiList[index]["emoji"]) # CCount custom emojis that are used in poll texts
|
||||||
|
|
||||||
# Process UTF8 Emojis
|
# Process UTF8 Emojis
|
||||||
if element["cw"] is not None:
|
if element["cw"] is not None:
|
||||||
UTF8text = element["text"] + " " + element["cw"]
|
UTF8text = element["text"] + " " + element["cw"]
|
||||||
else:
|
else:
|
||||||
UTF8text = element["text"]
|
UTF8text = element["text"]
|
||||||
|
|
||||||
|
if "poll" in element:
|
||||||
|
for pollchoice in element["poll"]["choices"]:
|
||||||
|
UTF8text += " " + pollchoice["text"]
|
||||||
|
|
||||||
UTF8ListRaw = emojilib.distinct_emoji_list(UTF8text) # Find all UTF8 Emojis in Text and CW text
|
UTF8ListRaw = emojilib.distinct_emoji_list(UTF8text) # Find all UTF8 Emojis in Text and CW text
|
||||||
UTF8text = emojilib.demojize(UTF8text)
|
UTF8text = emojilib.demojize(UTF8text)
|
||||||
if len(UTF8ListRaw) > 0:
|
if len(UTF8ListRaw) > 0:
|
||||||
|
|
Loading…
Reference in a new issue