aboutsummaryrefslogtreecommitdiff
path: root/bot.py
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-02-27 15:59:50 -0800
committerclarkzjw <[email protected]>2023-02-27 15:59:50 -0800
commit9bb00ee842649590cbd30af3e047e40ca9da9d90 (patch)
tree9d917eeb71166cb85758ff119f33a89f0fa80ec2 /bot.py
parent3bf39b0d32d0e0580457d0f85aef90a9c449a6ad (diff)
parenta1c7c5a223d22017508998599388c5adf9a90713 (diff)
downloadswarm2fediverse-83b33a5d270e9ed97140ae65ba7d20cbd0b1522a.tar.gz
Merge branch 'feature/user_permission'v0.1
add check_user decorator to check user login status
Diffstat (limited to 'bot.py')
-rw-r--r--bot.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot.py b/bot.py
index bcfab8f..364a85f 100644
--- a/bot.py
+++ b/bot.py
@@ -114,10 +114,10 @@ async def process_oauth_login_callback(update: FediLoginCallbackUpdate, context:
114 user.access_key = encrypt(access_token, ENCRYPT_KEY) 114 user.access_key = encrypt(access_token, ENCRYPT_KEY)
115 user.save() 115 user.save()
116 116
117 text = "You have successfully logged in to your Mastodon account!" 117 text = "You have successfully logged in to your Mastodon account!"
118 await context.bot.delete_message(chat_id=user.telegram_user_id, message_id=context.user_data[PROMPT_FEDI_LOGIN]) 118 await context.bot.delete_message(chat_id=user.telegram_user_id, message_id=context.user_data[PROMPT_FEDI_LOGIN])
119 await context.bot.send_message(chat_id=user.telegram_user_id, text=text) 119 await context.bot.send_message(chat_id=user.telegram_user_id, text=text)
120 await context.bot.send_message(chat_id=user.telegram_user_id, text=PROMPT_CHOOSE_ACTION, reply_markup=MAIN_MENU) 120 await context.bot.send_message(chat_id=user.telegram_user_id, text=PROMPT_CHOOSE_ACTION, reply_markup=MAIN_MENU)
121 121
122 122
123async def main() -> None: 123async def main() -> None:
Powered by cgit v1.2.3 (git 2.41.0)