diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-11-13 15:33:10 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-11-13 15:33:10 +0200 |
commit | b1e1ec7bdc9e84ecd31626f1a4fbf645e84d0bb2 (patch) | |
tree | 3ecf530456b311057658b3b2e749ad017074455b /mastodon | |
parent | a17b20cfa142469019cd5982ba200510afc1f884 (diff) | |
download | mastodon.py-b1e1ec7bdc9e84ecd31626f1a4fbf645e84d0bb2.tar.gz |
Add support for timed mutes, fix tests to actually pass with new setup
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index c55e006..2d56ac9 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -209,7 +209,7 @@ class Mastodon: | |||
209 | __DICT_VERSION_APPLICATION = "2.7.2" | 209 | __DICT_VERSION_APPLICATION = "2.7.2" |
210 | __DICT_VERSION_MENTION = "1.0.0" | 210 | __DICT_VERSION_MENTION = "1.0.0" |
211 | __DICT_VERSION_MEDIA = "3.2.0" | 211 | __DICT_VERSION_MEDIA = "3.2.0" |
212 | __DICT_VERSION_ACCOUNT = "3.1.0" | 212 | __DICT_VERSION_ACCOUNT = "3.3.0" |
213 | __DICT_VERSION_POLL = "2.8.0" | 213 | __DICT_VERSION_POLL = "2.8.0" |
214 | __DICT_VERSION_STATUS = bigger_version(bigger_version(bigger_version(bigger_version(bigger_version("3.1.0", __DICT_VERSION_MEDIA), __DICT_VERSION_ACCOUNT), __DICT_VERSION_APPLICATION), __DICT_VERSION_MENTION), __DICT_VERSION_POLL) | 214 | __DICT_VERSION_STATUS = bigger_version(bigger_version(bigger_version(bigger_version(bigger_version("3.1.0", __DICT_VERSION_MEDIA), __DICT_VERSION_ACCOUNT), __DICT_VERSION_APPLICATION), __DICT_VERSION_MENTION), __DICT_VERSION_POLL) |
215 | __DICT_VERSION_INSTANCE = bigger_version("3.1.4", __DICT_VERSION_ACCOUNT) | 215 | __DICT_VERSION_INSTANCE = bigger_version("3.1.4", __DICT_VERSION_ACCOUNT) |
@@ -2160,12 +2160,13 @@ class Mastodon: | |||
2160 | return self.__api_request('POST', url) | 2160 | return self.__api_request('POST', url) |
2161 | 2161 | ||
2162 | @api_version("1.1.0", "2.4.3", __DICT_VERSION_RELATIONSHIP) | 2162 | @api_version("1.1.0", "2.4.3", __DICT_VERSION_RELATIONSHIP) |
2163 | def account_mute(self, id, notifications=True): | 2163 | def account_mute(self, id, notifications=True, duration=None): |
2164 | """ | 2164 | """ |
2165 | Mute a user. | 2165 | Mute a user. |
2166 | 2166 | ||
2167 | Set `notifications` to False to receive notifications even though the user is | 2167 | Set `notifications` to False to receive notifications even though the user is |
2168 | muted from timelines. | 2168 | muted from timelines. Pass a `duration` in seconds to have Mastodon automatically |
2169 | lift the mute after that many seconds. | ||
2169 | 2170 | ||
2170 | Returns a `relationship dict`_ containing the updated relationship to the user. | 2171 | Returns a `relationship dict`_ containing the updated relationship to the user. |
2171 | """ | 2172 | """ |