Check hashtags in streaming API

This commit is contained in:
Lorenz Diener 2017-11-29 18:04:54 +01:00
pare c5970d10f9
commit a7e2caa369

Veure arxiu

@ -1044,6 +1044,8 @@ class Mastodon:
a subclass of StreamListener which will receive callbacks for incoming
events.
"""
if tag.startswith("#"):
raise MastodonIllegalArgumentError("Tag parameter should omit leading #")
return self.__stream("/api/v1/streaming/hashtag?tag={}".format(tag), listener)
###