Response to mastodon streaming requests

merge-requests/26/head
Bob Mottram 2022-02-25 10:29:14 +00:00
parent a3bc8c3b9c
commit 9647b864bb
1 changed files with 8 additions and 0 deletions

View File

@ -123,10 +123,18 @@ def masto_api_v1_response(path: str, calling_domain: str,
original_path = path
if '/followers?' in path or \
'/following?' in path or \
'/streaming/' in path or \
'/search?' in path or \
'/relationships?' in path or \
'/statuses?' in path:
path = path.split('?')[0]
if '/streaming/' in path:
streaming_msg = \
"Error: Streaming API not implemented on this instance"
send_json = {
"error": streaming_msg
}
send_json_str = 'masto API streaming response'
if path.endswith('/followers'):
send_json = []
send_json_str = \