diff --git a/chatbot/python/.gitignore b/chatbot/python/.gitignore new file mode 100644 index 00000000..0e11643a --- /dev/null +++ b/chatbot/python/.gitignore @@ -0,0 +1 @@ +.tn-cookie \ No newline at end of file diff --git a/chatbot/python/chatbot.py b/chatbot/python/chatbot.py index 78b81ae8..81a195c0 100644 --- a/chatbot/python/chatbot.py +++ b/chatbot/python/chatbot.py @@ -301,6 +301,7 @@ def read_auth_cookie(cookie_file_name): return schema, secret def on_login(cookie_file_name, params): + global botUID client_post(subscribe('me')) """Save authentication token to file""" @@ -308,7 +309,7 @@ def on_login(cookie_file_name, params): return if 'user' in params: - botUID = params['user'].decode("ascii") + botUID = params['user'].decode("ascii")[1:-1] # Protobuf map 'params' is not a python object or dictionary. Convert it. nice = {'schema': 'token'}