fix string id support to also include in_reply_to_... fields

This commit is contained in:
codl 2017-11-26 22:49:32 +01:00
pare ca11ef77ac
commit b9e6a1e9ba
No se encontró ninguna clave conocida en la base de datos para esta firma
ID de clave GPG: 6CD7C8891ED1233A

Veure arxiu

@ -1084,12 +1084,13 @@ class Mastodon:
"""
Converts json string IDs to native python bignums.
"""
if ('id' in json_object and
isinstance(json_object['id'], six.text_type)):
try:
json_object['id'] = int(json_object['id'])
except ValueError:
pass
for key in ('id', 'in_reply_to_id', 'in_reply_to_account_id'):
if (key in json_object and
isinstance(json_object[key], six.text_type)):
try:
json_object[key] = int(json_object[key])
except ValueError:
pass
return json_object