aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-02-27 15:18:48 -0800
committerclarkzjw <[email protected]>2023-02-27 15:18:48 -0800
commit0808f28fa7764694c0e52ce68e077dcbf05be322 (patch)
tree322e98152dd720a7f0ce4c4dc0247f24e30ad491 /callback.py
parent23aef802c9b493aeb66a1c250b6a3d16d299e63c (diff)
downloadswarm2fediverse-0808f28fa7764694c0e52ce68e077dcbf05be322.tar.gz
misskey is not supported
Diffstat (limited to 'callback.py')
-rw-r--r--callback.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/callback.py b/callback.py
index cb6a8d3..7530afb 100644
--- a/callback.py
+++ b/callback.py
@@ -82,12 +82,16 @@ async def process_media_group(context: CallbackContext):
82 82
83async def callback_generate_fedi_login_url(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int: 83async def callback_generate_fedi_login_url(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:
84 home_instance = update.effective_message.text 84 home_instance = update.effective_message.text
85 client_id, client_secret = Mastodon.create_app( 85 try:
86 "Checkin.bot", 86 client_id, client_secret = Mastodon.create_app(
87 scopes=BOT_SCOPE, 87 "Checkin.bot",
88 redirect_uris="{}{}".format(BOT_DOMAIN, FEDI_LOGIN_CALLBACK_URL), 88 scopes=BOT_SCOPE,
89 api_base_url=home_instance, 89 redirect_uris="{}{}".format(BOT_DOMAIN, FEDI_LOGIN_CALLBACK_URL),
90 ) 90 api_base_url=home_instance,
91 )
92 except KeyError as e:
93 await update.message.reply_text(PROMPT_INVALID_INSTANCE)
94 return FEDI_LOGIN
91 95
92 m = Mastodon(client_id=client_id, client_secret=client_secret, api_base_url=home_instance) 96 m = Mastodon(client_id=client_id, client_secret=client_secret, api_base_url=home_instance)
93 97
Powered by cgit v1.2.3 (git 2.41.0)