From 75e5f52871bbbe8da36a56111efb45f719e18d01 Mon Sep 17 00:00:00 2001 From: codl Date: Wed, 18 Oct 2017 21:04:52 +0200 Subject: [PATCH] make sure to convert mastodon post IDs to integers mastodon v2.0.0 changed IDs to be snowflake-like and returns them as strings in the API --- libforget/mastodon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libforget/mastodon.py b/libforget/mastodon.py index 4ecaef5..3b46149 100644 --- a/libforget/mastodon.py +++ b/libforget/mastodon.py @@ -129,7 +129,7 @@ def fetch_acc(acc, cursor=None): post = post_from_api_object(status, acc.mastodon_instance) db.session.merge(post) if 'max_id' not in kwargs: - kwargs['max_id'] = status['id'] + kwargs['max_id'] = int(status['id']) kwargs['max_id'] = min(int(kwargs['max_id']), int(status['id'])) else: