1
0
Fork 0

Workaround for wrong redirects on some instances

This commit is contained in:
Casey 2023-07-02 20:51:48 +03:00
parent 686cfced29
commit 8d91d619dd
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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(