From 6d37c4aa228d08b4e114f7918a2e8d5c83215b46 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Tue, 19 Aug 2025 10:49:15 +0300 Subject: [PATCH] Update accounts.py Fix account_relationships type and docs. --- mastodon/accounts.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mastodon/accounts.py b/mastodon/accounts.py index 846157c..c02913f 100644 --- a/mastodon/accounts.py +++ b/mastodon/accounts.py @@ -484,11 +484,13 @@ class Mastodon(Internals): return self.__api_request('POST', f'/api/v1/accounts/{id}/unendorse') @api_version("3.2.0", "3.2.0") - def account_note_set(self, id: Union[Account, IdType], comment: str) -> Account: + def account_note_set(self, id: Union[Account, IdType], comment: str) -> Relationship: """ Set a note (visible to the logged in user only) for the given account. The returned object contains the updated note. + + nb: To retrieve the current note for an account, use `account_relationships`. """ id = self.__unpack_id(id) params = self.__generate_params(locals(), ["id"]) @@ -514,4 +516,5 @@ class Mastodon(Internals): """ Delete the logged-in user's header. """ - self.__api_request('DELETE', '/api/v1/profile/header') \ No newline at end of file + + self.__api_request('DELETE', '/api/v1/profile/header')