diff options
author | Lorenz Diener <[email protected]> | 2017-11-29 18:04:54 +0100 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2017-11-29 18:04:54 +0100 |
commit | a7e2caa369639feb9c7562346dbb3d0827b37491 (patch) | |
tree | 0f71b43a7f8e56e6f5b4414ef49c0cd063c3a2cf | |
parent | c5970d10f904d0377df74bcbe6df28e1c27fddb0 (diff) | |
download | mastodon.py-a7e2caa369639feb9c7562346dbb3d0827b37491.tar.gz |
Check hashtags in streaming API
-rw-r--r-- | mastodon/Mastodon.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 9df51ea..2f84635 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -1044,6 +1044,8 @@ class Mastodon: | |||
1044 | a subclass of StreamListener which will receive callbacks for incoming | 1044 | a subclass of StreamListener which will receive callbacks for incoming |
1045 | events. | 1045 | events. |
1046 | """ | 1046 | """ |
1047 | if tag.startswith("#"): | ||
1048 | raise MastodonIllegalArgumentError("Tag parameter should omit leading #") | ||
1047 | return self.__stream("/api/v1/streaming/hashtag?tag={}".format(tag), listener) | 1049 | return self.__stream("/api/v1/streaming/hashtag?tag={}".format(tag), listener) |
1048 | 1050 | ||
1049 | ### | 1051 | ### |