From 057c925e5bb543c9cfaeb61a9145e5afa80e44ae Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Fri, 9 Aug 2019 18:47:46 +0200 Subject: [PATCH] Fix notification dismiss API call The old call to /api/v1/notifications/dismiss with the id in a form parameter is no longer supported. Posting to /api/v1/notifications/:id/dismiss is the new way to do it. --- mastodon/Mastodon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index b34e9d4..5924f01 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -1801,8 +1801,8 @@ class Mastodon: Deletes a single notification """ id = self.__unpack_id(id) - params = self.__generate_params(locals()) - self.__api_request('POST', '/api/v1/notifications/dismiss', params) + url = '/api/v1/notifications/{0}/dismiss'.format(str(id)) + return self.__api_request('POST', url) ###