aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 8c3f8fb..afee359 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -326,7 +326,7 @@ class Mastodon:
326 326
327 `feature_set` can be used to enable behaviour specific to non-mainline Mastodon API implementations. 327 `feature_set` can be used to enable behaviour specific to non-mainline Mastodon API implementations.
328 Details are documented in the functions that provide such functionality. Currently supported feature 328 Details are documented in the functions that provide such functionality. Currently supported feature
329 sets are `mainline` and `fedibird`. 329 sets are `mainline`, `fedibird` and `pleroma`.
330 """ 330 """
331 self.api_base_url = None 331 self.api_base_url = None
332 if not api_base_url is None: 332 if not api_base_url is None:
@@ -356,7 +356,7 @@ class Mastodon:
356 self.session = requests.Session() 356 self.session = requests.Session()
357 357
358 self.feature_set = feature_set 358 self.feature_set = feature_set
359 if not self.feature_set in ["mainline", "fedibird"]: 359 if not self.feature_set in ["mainline", "fedibird", "pleroma"]:
360 raise MastodonIllegalArgumentError('Requested invalid feature set') 360 raise MastodonIllegalArgumentError('Requested invalid feature set')
361 361
362 # Versioning 362 # Versioning
@@ -1677,6 +1677,13 @@ class Mastodon:
1677 if self.feature_set != "fedibird": 1677 if self.feature_set != "fedibird":
1678 raise MastodonIllegalArgumentError('quote_id is only available with feature set fedibird') 1678 raise MastodonIllegalArgumentError('quote_id is only available with feature set fedibird')
1679 quote_id = self.__unpack_id(quote_id) 1679 quote_id = self.__unpack_id(quote_id)
1680
1681 if content_type != None:
1682 if self.feature_set != "pleroma":
1683 raise MastodonIllegalArgumentError('quote_id is only available with feature set pleroma')
1684 # It would be better to read this from nodeinfo and cache, but this is easier
1685 if not content_type in ["text/plain", "text/html", "text/markdown", "text/bbcode"]:
1686 raise MastodonIllegalArgumentError('Invalid content type specified')
1680 1687
1681 if in_reply_to_id != None: 1688 if in_reply_to_id != None:
1682 in_reply_to_id = self.__unpack_id(in_reply_to_id) 1689 in_reply_to_id = self.__unpack_id(in_reply_to_id)
Powered by cgit v1.2.3 (git 2.41.0)