Use only emoji as sticker body if unicodedata doesn't find name. Fixes #252
This commit is contained in:
@@ -1307,7 +1307,10 @@ class Portal:
|
||||
if attrs["is_sticker"]:
|
||||
alt = attrs["sticker_alt"]
|
||||
if len(alt) > 0:
|
||||
name = f"{alt} ({unicodedata.name(alt[0]).lower()})"
|
||||
try:
|
||||
name = f"{alt} ({unicodedata.name(alt[0]).lower()})"
|
||||
except ValueError:
|
||||
name = alt
|
||||
|
||||
mime_type = document.mime_type or file.mime_type
|
||||
info = {
|
||||
|
||||
Reference in New Issue
Block a user