Send /start from a new device that is not yet in DB.
You'll get message "Welcome back, {first_name}!" instead of "Sup, {first_name}!"
The reason:
Method User.get_user_and_created is called twice for /start command: first in handler_logging function, second in command_start. On the second call created is always false, so the message is always "Welcome back".
Possible solution:
In handler_logging call func first, and then do the actual logging part.
Hi, found a small bug. Must be uppeared after resolving https://github.com/ohld/django-telegram-bot/issues/16 🙂
Steps to reproduce:
/start
from a new device that is not yet in DB."Welcome back, {first_name}!"
instead of"Sup, {first_name}!"
The reason: Method
User.get_user_and_created
is called twice for/start
command: first inhandler_logging
function, second incommand_start
. On the second callcreated
is always false, so the message is always"Welcome back"
.Possible solution: In
handler_logging
callfunc
first, and then do the actual logging part.