From 65cebc37ac18a82876feb872907f1c7847443f14 Mon Sep 17 00:00:00 2001 From: notagoat Date: Sun, 19 May 2019 13:54:59 +0100 Subject: [PATCH] Added toots! --- reply.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reply.py b/reply.py index ad982ca..3fe1159 100755 --- a/reply.py +++ b/reply.py @@ -53,11 +53,16 @@ class ReplyListener(mastodon.StreamListener): for user in validusers: if user["id"] == notification["account"]["id"]: #user is #valid print("User is valid") + visibility = notification['status']['visibility'] + if visibility == "public": + visibility = "unlisted" if mention == "pin": print("pin received, pinning") client.status_pin(pin) + client.status_post("Toot pinned!", post_id, visibility=visibility spoiler_text = cfg['cw']) else: print("unpin received, unpinning") + client.status_post("Toot Unpinned!", post_id, visibility=visibility spoiler_text = cfg['cw']) client.status_unpin(pin) else: print("User is not valid")