Workaround for wrong redirects on some instances
This commit is contained in:
parent
686cfced29
commit
8d91d619dd
|
@ -6,6 +6,11 @@ modules = telegram
|
|||
# Mastodon instance to grab posts from
|
||||
instance = mastodon.example.org
|
||||
|
||||
# Uncomment and change this if your instance makes invalid redirects
|
||||
# on the streaming path (like mastodon.social does). Check the following issue
|
||||
# for more details: https://github.com/hatkidchan/mastoposter/issues/45
|
||||
#streaming-url = wss://streaming.mastodon.example.org/api/v1/streaming
|
||||
|
||||
# Mastodon user token.
|
||||
# Required permissions: read:accounts read:statuses read:lists
|
||||
# You can get your token by creating application in
|
||||
|
|
|
@ -136,7 +136,10 @@ def main():
|
|||
|
||||
logger.info("account.id=%s", user_id)
|
||||
|
||||
url = "wss://{}/api/v1/streaming".format(conf["main"]["instance"])
|
||||
url = conf["main"].get(
|
||||
"streaming_url",
|
||||
"wss://{}/api/v1/streaming".format(conf["main"]["instance"]),
|
||||
)
|
||||
|
||||
run(
|
||||
listen(
|
||||
|
|
Loading…
Reference in New Issue