From 353b83d415061bff2881cbe324273409740be64c Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Fri, 24 Feb 2023 21:08:59 -0800 Subject: bot: implement delayed checkin, (kind of), some TODO left --- config.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'config.py') diff --git a/config.py b/config.py index fe69bd9..bff9313 100644 --- a/config.py +++ b/config.py @@ -18,7 +18,11 @@ BOT_PORT = int(config["API"]["BOT_PORT"]) MEDIA_GROUP_TIMEOUT = 3 -FEDI_LOGIN, WAIT_VISIBILITY, WAIT_LOCATION, LOCATION_SEARCH_KEYWORD, LOCATION_CONFIRMATION, ADD_MEDIA, ADD_COMMENT = range(7) +FEDI_LOGIN, \ + WAIT_VISIBILITY, \ + DELAYED_CHECKIN, \ + WAIT_LOCATION, LOCATION_SEARCH_KEYWORD, LOCATION_CONFIRMATION, \ + ADD_MEDIA, ADD_COMMENT = range(8) MAIN_MENU = ReplyKeyboardMarkup([ [KeyboardButton(text="Check-in here", request_location=True)], @@ -46,5 +50,10 @@ class MsgDict(TypedDict): KEY_TOOT_STATUS_ID = "toot_status_id" KEY_TOOT_STATUS_CONTENT = "toot_status_content" +KEY_IS_SCHEDULED_TOOT = "is_scheduled_toot" -BOT_SCOPE = ['read:accounts', 'write:media', 'write:statuses'] +# TODO: +# use the first scope as default +# if user set delayed post, ask user consent and request OAuth token again +# DEFAULT_BOT_SCOPE = ['read:accounts', 'write:media', 'write:statuses'] +BOT_SCOPE = ['read:accounts', 'read:statuses', 'write:media', 'write:statuses'] -- cgit v1.2.3