diff options
author | clarkzjw <[email protected]> | 2023-02-27 15:59:50 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-02-27 15:59:50 -0800 |
commit | 9bb00ee842649590cbd30af3e047e40ca9da9d90 (patch) | |
tree | 9d917eeb71166cb85758ff119f33a89f0fa80ec2 /bot.py | |
parent | 3bf39b0d32d0e0580457d0f85aef90a9c449a6ad (diff) | |
parent | a1c7c5a223d22017508998599388c5adf9a90713 (diff) | |
download | swarm2fediverse-9bb00ee842649590cbd30af3e047e40ca9da9d90.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.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 | ||
123 | async def main() -> None: | 123 | async def main() -> None: |