mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fixed possible incorrect escaping of list[str].
By default if you call str() on collection python will escape strings inside of it using single quotes, which will cause "Can't parse custom emoji identifiers json object" error when calling getCustomEmojiStickers. json.dumps() escapes strings by double quotes so no error occurs.
This commit is contained in:
parent
96ebee26e4
commit
492657b1e9
1 changed files with 4 additions and 1 deletions
|
|
@ -166,7 +166,10 @@ def compose_data(params=None, files=None):
|
|||
|
||||
if params:
|
||||
for key, value in params.items():
|
||||
data.add_field(key, str(value))
|
||||
if isinstance(value, (list, dict)):
|
||||
data.add_field(key, json.dumps(value))
|
||||
else:
|
||||
data.add_field(key, str(value))
|
||||
|
||||
if files:
|
||||
for key, f in files.items():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue