add cw, request notif permission

This commit is contained in:
Lynne Megido 2019-05-11 02:45:27 +10:00
parent 96e575edba
commit e03e2ad4b5
2 changed files with 2 additions and 2 deletions

View file

@ -2,7 +2,7 @@
import json import json
from mastodon import Mastodon from mastodon import Mastodon
scopes = ["read:statuses", "read:accounts", "read:follows", "write:statuses"] scopes = ["read:statuses", "read:accounts", "read:follows", "write:statuses", "read:notifications"]
cfg = json.load(open('config.json', 'r')) cfg = json.load(open('config.json', 'r'))
if "client" not in cfg: if "client" not in cfg:

View file

@ -65,7 +65,7 @@ class ReplyListener(mastodon.StreamListener):
visibility = notification['status']['visibility'] visibility = notification['status']['visibility']
if visibility == "public": if visibility == "public":
visibility = "unlisted" visibility = "unlisted"
client.status_post(toot, post_id, visibility=visibility) client.status_post(toot, post_id, visibility=visibility, spoiler_text = "Search result")
print("replied with " + toot) print("replied with " + toot)
rl = ReplyListener() rl = ReplyListener()