From 740fa16a06f9aeae839ffda6344c663a258d8e85 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 24 May 2016 14:44:11 +0300 Subject: fix telegram signup --- src/main/java/com/juick/api/TelegramBotHook.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/juick/api/TelegramBotHook.java b/src/main/java/com/juick/api/TelegramBotHook.java index fa05c2f0..8c23973e 100644 --- a/src/main/java/com/juick/api/TelegramBotHook.java +++ b/src/main/java/com/juick/api/TelegramBotHook.java @@ -153,10 +153,10 @@ public class TelegramBotHook { addChat(message.chat().id()); logger.info("added chat with " + message.from().firstName()); createTelegramUser(message.from().id(), message.from().username()); - telegramSignupNotify(message.from().id().longValue(), UserQueries.getSignUpHashByTelegramID(jdbc, message.from().id().longValue())); + telegramSignupNotify(message.from().id().longValue(), UserQueries.getSignUpHashByTelegramID(jdbc, message.from().id().longValue(), message.from().username())); } else { if (user_from.getUID() == 0) { - telegramSignupNotify(message.from().id().longValue(), UserQueries.getSignUpHashByTelegramID(jdbc, message.from().id().longValue())); + telegramSignupNotify(message.from().id().longValue(), UserQueries.getSignUpHashByTelegramID(jdbc, message.from().id().longValue(), message.from().username())); } else if (message.text().equalsIgnoreCase("/login")) { String msg = String.format("Hi, %s!\nTap to log in", user_from.getUName()); String msgUrl = "http://juick.com/login?" + UserQueries.getHashByUID(jdbc, user_from.getUID()); -- cgit v1.2.3