dont consume the update message so early

master
lza_menace 4 years ago
parent bab0c80874
commit 66159e96b8

@ -58,7 +58,6 @@ def register(update, context):
if db.User.filter(telegram_id=uid, telegram_user=un): if db.User.filter(telegram_id=uid, telegram_user=un):
update.message.reply_text('You are already registered. Use /help to see available bot commands.') update.message.reply_text('You are already registered. Use /help to see available bot commands.')
else: else:
update.message.reply_text('Your ID exists in the database already but your `first_name` attribute has changed. Updating.')
try: try:
u = db.User.get(telegram_id=uid) u = db.User.get(telegram_id=uid)
u.telegram_user = un u.telegram_user = un

Loading…
Cancel
Save